Skip to content

Commit

Permalink
Added new helper for checking whether a poject has features to import
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Jul 25, 2010
1 parent 073f068 commit a43d010
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -5,9 +5,28 @@
require 'spec/autorun'
require 'spec/rails'
require File.join(RAILS_ROOT, 'spec', 'blueprints')
#require File.join(RAILS_ROOT, 'spec', 'matchers')
# Uncomment the next line to use webrat's matchers
require 'webrat/integrations/rspec-rails'

Spec::Matchers.define :have_features_to_import do
match do |project|
project.features_to_import?
end

failure_message_for_should do
"expected the project to have features to import"
end

failure_message_for_should_not do
"expected the project not to have any features to import"
end

description do
"expected the project to have features to import"
end
end

def content_for(name)
response.template.instance_variable_get("@content_for_#{name}")
end
Expand Down

0 comments on commit a43d010

Please sign in to comment.