class NullDB::RSpec::NullifiedDatabase::HaveExecuted

Public Class Methods

new(entry_point) click to toggle source
# File lib/nulldb_rspec.rb, line 13
def initialize(entry_point)
  @entry_point = entry_point
end

Public Instance Methods

description() click to toggle source
# File lib/nulldb_rspec.rb, line 26
def description
  "connection should execute #{@entry_point} statement"
end
failure_message() click to toggle source
# File lib/nulldb_rspec.rb, line 30
def failure_message
  " did not execute #{@entry_point} statement when it should have"
end
matches?(connection) click to toggle source
# File lib/nulldb_rspec.rb, line 17
def matches?(connection)
  log = connection.execution_log_since_checkpoint
  if @entry_point == :anything
    not log.empty?
  else
    log.include?(NullDBAdapter::Statement.new(@entry_point))
  end
end
negative_failure_message() click to toggle source
# File lib/nulldb_rspec.rb, line 34
def negative_failure_message
  " executed #{@entry_point} statement when it should not have"
end