swiss_knife 2.0.1 → 2.0.2

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: 729ad486b994bb6f11a3f34ffa3edb1762b45326
4
- data.tar.gz: b248b19c54f6a7295a053e5e15fe9996cdfc7b38
3
+ metadata.gz: 20fbdb31c225cb32272d6b583b130306e8f1af04
4
+ data.tar.gz: c6bb27154af3dc7b320e58fbabdc51b467494985
5
5
  SHA512:
6
- metadata.gz: 63a6b8fae94eabc88774ce0d14c73ebfbc97152c1841e4c08bd5e8629ecdd08434c35783f1805f3817f42dba9170ed3ebcbe269cb6f9eb7b2d7999689c98756d
7
- data.tar.gz: 62ebc222a7c1cd392e3f2775ee8957efdc837498ca4f7600be3eed778e56251fe9e4e3cdca3e61314b90c6b7fb61fa3178194e12ad94a9a850fa97793723113c
6
+ metadata.gz: f3f0240074d34665c81aaf9758789154db92ca3fc2cfc8dbfdc52a6d731a54b3ce909a8f2735ec245eb0fd12d16b4f90442674b85020fa31104cbc7f4b500611
7
+ data.tar.gz: fac244842bf7014907bb360fbbe1530528dbe329ce66e7cd2eb845a51e9826716f63cdd3b36a447c3c2f9d24be681af8a8cccb7dff16a2bac9bcd5ccf4fb15f9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- swiss_knife (2.0.1)
4
+ swiss_knife (2.0.2)
5
5
  rails
6
6
 
7
7
  GEM
@@ -1,6 +1,6 @@
1
1
  require "swiss_knife/rspec/have_tag"
2
2
  require "swiss_knife/rspec/have_text"
3
- require "swiss_knife/rspec/allow"
3
+ require "swiss_knife/rspec/accept"
4
4
  require "swiss_knife/rspec/have_error_on"
5
5
 
6
6
  RSpec.configure do |config|
@@ -1,11 +1,11 @@
1
1
  module SwissKnife
2
2
  module RSpec
3
3
  module Matchers
4
- def allow(*values)
5
- Allow.new(values)
4
+ def accept(*values)
5
+ Accept.new(values)
6
6
  end
7
7
 
8
- class Allow
8
+ class Accept
9
9
  attr_accessor :values, :record, :failed, :attribute
10
10
 
11
11
  def initialize(values)
@@ -2,7 +2,7 @@ module SwissKnife
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- PATCH = 1
5
+ PATCH = 2
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
@@ -1,20 +1,20 @@
1
- require "swiss_knife/rspec/allow"
1
+ require "swiss_knife/rspec/accept"
2
2
  require "active_record"
3
3
 
4
4
  ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
5
5
 
6
6
  require File.expand_path("../../../schema", __FILE__)
7
7
 
8
- describe "allow matcher" do
8
+ describe "accept matcher" do
9
9
  include SwissKnife::RSpec::Matchers
10
10
 
11
- it "allows blank values" do
11
+ it "accepts blank values" do
12
12
  klass = Class.new(ActiveRecord::Base) do
13
13
  self.table_name = "users"
14
14
  end
15
15
 
16
16
  record = klass.new
17
- record.should allow(nil, "").for(:name)
17
+ record.should accept(nil, "").for(:name)
18
18
  end
19
19
 
20
20
  it "requires name to be set" do
@@ -26,15 +26,15 @@ describe "allow matcher" do
26
26
  klass.stub name: "User"
27
27
 
28
28
  record = klass.new
29
- record.should_not allow(nil, "").for(:name)
29
+ record.should_not accept(nil, "").for(:name)
30
30
  end
31
31
 
32
- it "allows values" do
32
+ it "accepts values" do
33
33
  klass = Class.new(ActiveRecord::Base) do
34
34
  self.table_name = "users"
35
35
  end
36
36
 
37
37
  record = klass.new
38
- record.should allow("John Doe", "Jane Doe").for(:name)
38
+ record.should accept("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.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
@@ -133,7 +133,7 @@ files:
133
133
  - lib/swiss_knife/railtie.rb
134
134
  - lib/swiss_knife/rake_tasks.rb
135
135
  - lib/swiss_knife/rspec.rb
136
- - lib/swiss_knife/rspec/allow.rb
136
+ - lib/swiss_knife/rspec/accept.rb
137
137
  - lib/swiss_knife/rspec/have_error_on.rb
138
138
  - lib/swiss_knife/rspec/have_tag.rb
139
139
  - lib/swiss_knife/rspec/have_text.rb
@@ -171,7 +171,7 @@ files:
171
171
  - spec/swiss_knife/i18n_js_spec.rb
172
172
  - spec/swiss_knife/jquery_spec.rb
173
173
  - spec/swiss_knife/jquery_ujs_spec.rb
174
- - spec/swiss_knife/rspec/allow_spec.rb
174
+ - spec/swiss_knife/rspec/accept_spec.rb
175
175
  - spec/swiss_knife/rspec/have_error_on_spec.rb
176
176
  - spec/swiss_knife/rspec/have_text_spec.rb
177
177
  - swiss_knife.gemspec