remockable 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ RSpec::Matchers.define(:belong_to) do |*attributes|
|
|
9
9
|
|
10
10
|
match do |actual|
|
11
11
|
if association = subject.class.reflect_on_association(@association)
|
12
|
-
macro_matches = association.macro
|
12
|
+
macro_matches = association.macro == :belongs_to
|
13
13
|
options_match = association.options.slice(*expected.keys) == expected
|
14
14
|
macro_matches && options_match
|
15
15
|
end
|
@@ -9,7 +9,7 @@ RSpec::Matchers.define(:have_and_belong_to_many) do |*attributes|
|
|
9
9
|
|
10
10
|
match do |actual|
|
11
11
|
if association = subject.class.reflect_on_association(@association)
|
12
|
-
macro_matches = association.macro
|
12
|
+
macro_matches = association.macro == :has_and_belongs_to_many
|
13
13
|
options_match = association.options.slice(*expected.keys) == expected
|
14
14
|
macro_matches && options_match
|
15
15
|
end
|
@@ -9,7 +9,7 @@ RSpec::Matchers.define(:have_many) do |*attributes|
|
|
9
9
|
|
10
10
|
match do |actual|
|
11
11
|
if association = subject.class.reflect_on_association(@association)
|
12
|
-
macro_matches = association.macro
|
12
|
+
macro_matches = association.macro == :has_many
|
13
13
|
options_match = association.options.slice(*expected.keys) == expected
|
14
14
|
macro_matches && options_match
|
15
15
|
end
|
@@ -9,7 +9,7 @@ RSpec::Matchers.define(:have_one) do |*attributes|
|
|
9
9
|
|
10
10
|
match do |actual|
|
11
11
|
if association = subject.class.reflect_on_association(@association)
|
12
|
-
macro_matches = association.macro
|
12
|
+
macro_matches = association.macro == :has_one
|
13
13
|
options_match = association.options.slice(*expected.keys) == expected
|
14
14
|
macro_matches && options_match
|
15
15
|
end
|
data/lib/remockable/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: remockable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.9
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Tyler Hunt
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-12 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|