Sha256: c14d59bf8eadc02d1eb8c6bcdcc09564c26252da62cfa7de75be1b3c22a72fb5

Contents?: true

Size: 895 Bytes

Versions: 97

Compression:

Stored size: 895 Bytes

Contents

When "I include comments" do
  @results = nil
  @options[:include] = :comments
end

When /^I get the first comment$/ do
  @comment = Comment.find(:first)
end

When /^I track queries$/ do
  $queries_executed = []
end

When /^I compare comments$/ do
  results.first.comments.first.should == @comment
end

When /^I select only content$/ do
  @results = nil
  @options[:select] = "id, content"
end

Then /^I should have (\d+) quer[yies]+$/ do |count|
  $queries_executed.length.should == count.to_i
end

Then /^I should not get an error accessing the subject$/ do
  lambda { results.first.subject }.should_not raise_error
end

Then /^I should get an error accessing the subject$/ do
  error_class = NoMethodError
  error_class = ActiveRecord::MissingAttributeError if ActiveRecord.constants.include?("MissingAttributeError")
  
  lambda { results.first.subject }.should raise_error(error_class)
end

Version data entries

97 entries across 97 versions & 16 rubygems

Version Path
hawkerb-thinking-sphinx-1.3.18 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.17 features/step_definitions/find_arguments_steps.rb
warp-thinking-sphinx-1.3.16 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.16 features/step_definitions/find_arguments_steps.rb
hawkerb-thinking-sphinx-1.3.17 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.15 features/step_definitions/find_arguments_steps.rb
hawkerb-thinking-sphinx-1.3.16 features/step_definitions/find_arguments_steps.rb
hawkerb-thinking-sphinx-1.3.15 features/step_definitions/find_arguments_steps.rb
hawkerb-thinking-sphinx-1.3.14 features/step_definitions/find_arguments_steps.rb
zipme-thinking-sphinx-1.3.14 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.14 features/step_definitions/find_arguments_steps.rb
warp-thinking-sphinx-1.3.13 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.13 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.12 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.11 features/step_definitions/find_arguments_steps.rb
warp-thinking-sphinx-1.3.11 features/step_definitions/find_arguments_steps.rb
warp-thinking-sphinx-1.3.10 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.10 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.3.9 features/step_definitions/find_arguments_steps.rb
ts-xml-0.0.1 features/step_definitions/find_arguments_steps.rb