remockable 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ RSpec::Matchers.define(:have_column) do |*attributes|
7
7
  valid_options %w(default limit null precision scale type)
8
8
 
9
9
  match do |actual|
10
- if column = subject.columns.detect { |column| column.name == @column.to_s }
10
+ if column = subject.class.columns.detect { |column| column.name == @column.to_s }
11
11
  @expected.all? { |key, value| column.send(key).should == value }
12
12
  end
13
13
  end
@@ -9,7 +9,7 @@ RSpec::Matchers.define(:have_index) do |*attributes|
9
9
  match do |actual|
10
10
  name = @expected[:name]
11
11
  unique = @expected[:unique]
12
- indexes = ActiveRecord::Base.connection.indexes(subject.table_name)
12
+ indexes = ActiveRecord::Base.connection.indexes(subject.class.table_name)
13
13
 
14
14
  column_names = @columns.flatten.collect(&:to_s)
15
15
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tyler Hunt