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 +5 -5
- data/lib/morse_spec_helpers.rb +20 -4
- data/lib/morse_spec_helpers/version.rb +1 -1
- data/morse_spec_helpers.gemspec +1 -1
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fa07527b04b67abba2f572990256ab4550515af784311356c1d3de595135e615
|
4
|
+
data.tar.gz: 39074b39b56a8dda662306626379694783674a1f9a72475b8fc8238915ba1db2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a8e9222ff8cf1743f3a1ab12f972d343588865be1de347b6cd0c667d3967cb2239ce20ecd86c0dcf76c2ffb63536008631e9d300680e73809b744adef58e3de
|
7
|
+
data.tar.gz: a3c64b746bb8e45d67c59cb93007a1647eb2cfb50c6c792f0c4f104b5d9456263211f31fd04fce6fe9f227529d26fcb178046d46107333788c4db6bd7e3d6482
|
data/lib/morse_spec_helpers.rb
CHANGED
@@ -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
|
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
|
data/morse_spec_helpers.gemspec
CHANGED
@@ -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"
|
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:
|
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:
|
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: '
|
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: '
|
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
|
-
|
81
|
-
|
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: []
|