swiss_knife 2.0.0 → 2.0.1

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: df717c4bc8d0ba025b84e4ca02b1dd01e3ea8c3b
4
- data.tar.gz: 1cdfa97a6f65bcba50ce0f068289e2cfa77a7dcd
3
+ metadata.gz: 729ad486b994bb6f11a3f34ffa3edb1762b45326
4
+ data.tar.gz: b248b19c54f6a7295a053e5e15fe9996cdfc7b38
5
5
  SHA512:
6
- metadata.gz: a7370024be3d12c0e581214c2079555e5aa4a9ce3d4201953e3c67410f13b8136e76c77d26b354a0e647b26404ff81194e7840bfe7ab9a194d23d5771e0b48f2
7
- data.tar.gz: c9ebb7065ace7ae98f12bf82c6ee4207f47332436a464aa917724102f9efc083c8a9dc840974303afcfce823f2ea2ae0c2d7318610d7689cb18cd9fd6dec3419
6
+ metadata.gz: 63a6b8fae94eabc88774ce0d14c73ebfbc97152c1841e4c08bd5e8629ecdd08434c35783f1805f3817f42dba9170ed3ebcbe269cb6f9eb7b2d7999689c98756d
7
+ data.tar.gz: 62ebc222a7c1cd392e3f2775ee8957efdc837498ca4f7600be3eed778e56251fe9e4e3cdca3e61314b90c6b7fb61fa3178194e12ad94a9a850fa97793723113c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- swiss_knife (2.0.0)
4
+ swiss_knife (2.0.1)
5
5
  rails
6
6
 
7
7
  GEM
@@ -35,7 +35,7 @@ module SwissKnife
35
35
  "expected #{record.inspect} to reject each of #{values.inspect} as #{attribute.inspect} value (accepted #{failed.inspect})"
36
36
  end
37
37
 
38
- def as(attribute)
38
+ def for(attribute)
39
39
  @attribute = attribute
40
40
  self
41
41
  end
@@ -2,7 +2,7 @@ module SwissKnife
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- PATCH = 0
5
+ PATCH = 1
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
@@ -1,4 +1,5 @@
1
1
  ENV["RAILS_ENV"] = "test"
2
+ require "bundler/setup"
2
3
  require "rails"
3
4
  require "ostruct"
4
5
  require "swiss_knife"
@@ -14,7 +14,7 @@ describe "allow matcher" do
14
14
  end
15
15
 
16
16
  record = klass.new
17
- record.should allow(nil, "").as(:name)
17
+ record.should allow(nil, "").for(:name)
18
18
  end
19
19
 
20
20
  it "requires name to be set" do
@@ -26,7 +26,7 @@ describe "allow matcher" do
26
26
  klass.stub name: "User"
27
27
 
28
28
  record = klass.new
29
- record.should_not allow(nil, "").as(:name)
29
+ record.should_not allow(nil, "").for(:name)
30
30
  end
31
31
 
32
32
  it "allows values" do
@@ -35,6 +35,6 @@ describe "allow matcher" do
35
35
  end
36
36
 
37
37
  record = klass.new
38
- record.should allow("John Doe", "Jane Doe").as(:name)
38
+ record.should allow("John Doe", "Jane Doe").for(:name)
39
39
  end
40
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swiss_knife
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira