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
sherpa99-thinking-sphinx-1.1.4 features/step_definitions/find_arguments_steps.rb
friendlyfashion-thinking-sphinx-2.0.14.4 features/step_definitions/find_arguments_steps.rb
friendlyfashion-thinking-sphinx-2.0.14.3 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-2.1.0 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.5.0 features/step_definitions/find_arguments_steps.rb
friendlyfashion-thinking-sphinx-2.0.14.2 features/step_definitions/find_arguments_steps.rb
friendlyfashion-thinking-sphinx-2.0.14.1 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-2.0.14 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.4.14 features/step_definitions/find_arguments_steps.rb
friendlyfashion-thinking-sphinx-2.0.13.3 features/step_definitions/find_arguments_steps.rb
friendlyfashion-thinking-sphinx-2.0.13.2 features/step_definitions/find_arguments_steps.rb
friendlyfashion-thinking-sphinx-2.0.13.1 features/step_definitions/find_arguments_steps.rb
friendlyfashion-thinking-sphinx-2.0.13 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-2.0.13 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.4.13 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-2.0.12 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.4.12 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-2.0.11 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-1.4.11 features/step_definitions/find_arguments_steps.rb
thinking-sphinx-2.0.10 features/step_definitions/find_arguments_steps.rb