Module: RSpec::ActiveRecord::Expectations

Defined in:
lib/rspec/activerecord/expectations.rb,
lib/rspec/activerecord/expectations/errors.rb,
lib/rspec/activerecord/expectations/collector.rb,
lib/rspec/activerecord/expectations/message_builder.rb,
lib/rspec/activerecord/expectations/query_inspector.rb,
lib/rspec/activerecord/expectations/matchers/load_matcher.rb,
lib/rspec/activerecord/expectations/matchers/query_count_matcher.rb,
lib/rspec/activerecord/expectations/matchers/transaction_matcher.rb

Defined Under Namespace

Modules: Matchers Classes: Collector, MessageBuilder, NoComparisonError, NoQueryTypeError, QueryInspector

Instance Method Summary collapse

Instance Method Details

#commit_a_transactionObject



24
25
26
# File 'lib/rspec/activerecord/expectations.rb', line 24

def commit_a_transaction
  Matchers::TransactionMatcher.new(:commit_queries)
end

#executeObject



4
5
6
# File 'lib/rspec/activerecord/expectations.rb', line 4

def execute
  Matchers::QueryCountMatcher.new
end

#execute_a_transactionObject



12
13
14
# File 'lib/rspec/activerecord/expectations.rb', line 12

def execute_a_transaction
  Matchers::TransactionMatcher.new(:transaction_queries)
end

#repeatedly_load(klass) ⇒ Object



8
9
10
# File 'lib/rspec/activerecord/expectations.rb', line 8

def repeatedly_load(klass)
  Matchers::LoadMatcher.new(klass)
end

#roll_back_a_transactionObject



20
21
22
# File 'lib/rspec/activerecord/expectations.rb', line 20

def roll_back_a_transaction
  Matchers::TransactionMatcher.new(:rollback_queries)
end

#rollback_a_transactionObject



16
17
18
# File 'lib/rspec/activerecord/expectations.rb', line 16

def rollback_a_transaction
  Matchers::TransactionMatcher.new(:rollback_queries)
end