Created
March 17, 2009 05:18
-
-
Save pelle/80291 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoMethodError: You have a nil object when you didn't expect it! | |
You might have expected an instance of Array. | |
The error occurred while evaluating nil.- | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions' | |
/Library/Ruby/Gems/1.8/gems/aslakhellesoy-cucumber-0.1.99.23/bin/../lib/cucumber/rails/world.rb:61:in `__instance_exec0' | |
/Library/Ruby/Gems/1.8/gems/rspec-1.2.0/lib/spec/matchers/extensions/instance_exec.rb:19:in `send' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sets up the Rails environment for Cucumber | |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
require 'cucumber/rails/world' | |
require 'cucumber/formatters/unicode' | |
require 'webrat' | |
require 'cucumber/rails/rspec' | |
require 'webrat/core/matchers' | |
require 'spec/mocks' | |
require File.expand_path(File.dirname(__FILE__) + '/../../spec/honors_helper') | |
gem 'htmlentities' | |
require 'htmlentities' | |
def logger | |
ActiveRecord::Base.logger | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cucumber::Rails.use_transactional_fixtures | |
Webrat.configure do |config| | |
config.mode=:rails | |
end | |
#Seed the DB | |
Fixtures.reset_cache | |
fixtures_folder = File.join(RAILS_ROOT, 'spec', 'fixtures') | |
fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') } | |
Fixtures.create_fixtures(fixtures_folder, fixtures, {:medinsight_specialty => "Specialty"}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment