morse_spec_helpers 0.0.14 → 0.0.15

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
2
  SHA1:
3
- metadata.gz: d8aaba1cc10846102c12ae282acc4e9bbac3a989
4
- data.tar.gz: 72896be660a250f884abf21f49a1225d9adced77
3
+ metadata.gz: f1f254943bb6c5c50fbdf4c60e204dd06bbb7fcd
4
+ data.tar.gz: d3d1126477ffdd07bcba3607889c62291e1d6c83
5
5
  SHA512:
6
- metadata.gz: b41509ef65a1db41f58d7a4fd9fe5de424827565db5d120fd344427d150f9ce9f7b0b51ef7c940ae7b7a2559f4020997ac490cae6b9a54d5dd5860504269b5c6
7
- data.tar.gz: 0eed20aec84953a42df1aef42d74002e23f3c4f462df5d3729452f386b3695f59bc1ab27f37ac087ff3304c52f8e739c8a7fea4b67a87b87197a0953019a6c47
6
+ metadata.gz: 1a2dc5c557e2b35b88cf37cba40917619b55fac91adf1b9a7d6d29d4ca0134562cf1c5bcee750badf0bd316c0c9d956300a178d9ff9a81834e9b52a21c5bdc94
7
+ data.tar.gz: eab3593c35064ce2951d2b226acaac58d8e22806196146447748c07ab14170d42f1e33b9aec63d791e5de2e8b349eb640890881a4db1c2a0c111f21283a24db6
@@ -1,3 +1,3 @@
1
1
  module MorseSpecHelpers
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
@@ -529,9 +529,25 @@ module MorseSpecHelpers
529
529
  expect(@instance).to be_valid
530
530
  end
531
531
  end
532
+
532
533
  def should_not_be_valid
533
534
  it "should not be valid" do
534
535
  expect(@instance).to_not be_valid
535
536
  end
536
537
  end
538
+
539
+ def there_can_be_only_one(thing)
540
+ it "should allow only one #{thing}" do
541
+ model=@instance.class
542
+ model_for_factory_girl=model.to_s.underscore
543
+ thing1=FactoryGirl.create model_for_factory_girl, thing=>true
544
+ thing2=FactoryGirl.create model_for_factory_girl, thing=>false
545
+ thing2.update_attribute(thing,true)
546
+ thing2.save
547
+ thing1.reload
548
+ expect(thing1.send(thing)).to be_falsey
549
+ expect(thing2.send(thing)).to be_truthy
550
+ end
551
+ end
552
+
537
553
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morse_spec_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terry S
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-19 00:00:00.000000000 Z
11
+ date: 2015-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.2.2
81
+ rubygems_version: 2.4.5
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: A series of helpers to make the rspec experience nicer.