morse_spec_helpers 2.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0ebf686025b5cc17c869bc0be46f3fc2005cf079
4
- data.tar.gz: 10caa8ee1bdaff71f2a20fc57209e07c57bc66f5
2
+ SHA256:
3
+ metadata.gz: fa07527b04b67abba2f572990256ab4550515af784311356c1d3de595135e615
4
+ data.tar.gz: 39074b39b56a8dda662306626379694783674a1f9a72475b8fc8238915ba1db2
5
5
  SHA512:
6
- metadata.gz: 81297ab5b851f8523724b4a10cd32f178fe1e66110d90b947ef03a6f4258ec75d504661171fd37a276479c7f8f046bb6046bd6b75f241d37147bcb5088b4af0c
7
- data.tar.gz: e84a330de156271297a93e369a7da4686dd3f6a0608b2e234e74269dc2e8e1ae60feb75e2601be8de1a4f8b66864bf3bf7cb2b788383eb10b31d1b04cf254d51
6
+ metadata.gz: 1a8e9222ff8cf1743f3a1ab12f972d343588865be1de347b6cd0c667d3967cb2239ce20ecd86c0dcf76c2ffb63536008631e9d300680e73809b744adef58e3de
7
+ data.tar.gz: a3c64b746bb8e45d67c59cb93007a1647eb2cfb50c6c792f0c4f104b5d9456263211f31fd04fce6fe9f227529d26fcb178046d46107333788c4db6bd7e3d6482
@@ -6,6 +6,18 @@ end
6
6
 
7
7
  module MorseSpecHelpers
8
8
 
9
+ def acts_as_a_list
10
+ describe 'acts_as_list' do
11
+ describe 'given a blank position on save' do
12
+ it 'should add itself to the list' do
13
+ @instance.position = nil
14
+ @instance.save
15
+ @instance.position.should_not be_nil
16
+ end
17
+ end
18
+ end
19
+ end
20
+
9
21
  def boolean_default_false(method)
10
22
  exists(method)
11
23
  it "should default to false" do
@@ -90,9 +102,9 @@ module MorseSpecHelpers
90
102
  end
91
103
  context "where it is not present" do
92
104
  it "should set to the default" do
93
- @instance.send("{method}=", nil)
105
+ @instance.send("#{method}=", nil)
94
106
  expect(@instance).to be_valid
95
- expect(@instance.send(method)).to eq(default)
107
+ expect(@instance.send(method)).to eq(default)
96
108
  end
97
109
  end
98
110
  end
@@ -564,7 +576,7 @@ module MorseSpecHelpers
564
576
 
565
577
  def returns_200
566
578
  it "returns http success" do
567
- expect(response).to be_success
579
+ expect(response).to be_successful
568
580
  end
569
581
  end
570
582
 
@@ -620,8 +632,12 @@ module MorseSpecHelpers
620
632
  end
621
633
  end
622
634
 
635
+ def view_allow_variable(variable_name, value = '')
636
+ allow(view).to receive(variable_name).and_return value
637
+ end
638
+
623
639
  def view_allow_simple_form_for(thing, f=:f)
624
- form=SimpleForm::FormBuilder.new(thing.class, thing, self, {})
640
+ form=SimpleForm::FormBuilder.new(thing.class.name, thing, self, {})
625
641
  allow(view).to receive(f).and_return(form)
626
642
  end
627
643
  end
@@ -1,3 +1,3 @@
1
1
  module MorseSpecHelpers
2
- VERSION = "2.0.0"
2
+ VERSION = "4.0.0"
3
3
  end
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.add_development_dependency "bundler"
22
22
  spec.add_development_dependency "rake"
23
23
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morse_spec_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terry S
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-02 00:00:00.000000000 Z
11
+ date: 2021-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -62,7 +62,7 @@ homepage: ''
62
62
  licenses:
63
63
  - MIT
64
64
  metadata: {}
65
- post_install_message:
65
+ post_install_message:
66
66
  rdoc_options: []
67
67
  require_paths:
68
68
  - lib
@@ -77,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
79
  requirements: []
80
- rubyforge_project:
81
- rubygems_version: 2.5.1
82
- signing_key:
80
+ rubygems_version: 3.1.4
81
+ signing_key:
83
82
  specification_version: 4
84
83
  summary: A series of helpers to make the rspec experience nicer.
85
84
  test_files: []