Skip to content

Commit

Permalink
RSpec2 changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
marano authored and myronmarston committed Jul 20, 2010
1 parent c58d4ce commit 2065d5c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/nulldb_rspec.rb
Expand Up @@ -37,7 +37,7 @@ def negative_failure_message
end

def self.globally_nullify_database
Spec::Runner.configure do |config|
RSpec.configure do |config|
nullify_database(config)
end
end
Expand Down Expand Up @@ -78,13 +78,13 @@ def self.included(other)
end

def self.nullify_contextually?(other)
if defined? Spec::Rails::Example::RailsExampleGroup
other.ancestors.include?(Spec::Rails::Example::RailsExampleGroup)
if defined? RSpec::Rails::RailsExampleGroup
other.ancestors.include?(RSpec::Rails::RailsExampleGroup)
else
other.ancestors.include?(Spec::Rails::Example::ModelExampleGroup) ||
other.ancestors.include?(Spec::Rails::Example::ControllerExampleGroup) ||
other.ancestors.include?(Spec::Rails::Example::ViewExampleGroup) ||
other.ancestors.include?(Spec::Rails::Example::HelperExampleGroup)
other.ancestors.include?(RSpec::Rails::ModelExampleGroup) ||
other.ancestors.include?(RSpec::Rails::ControllerExampleGroup) ||
other.ancestors.include?(RSpec::Rails::ViewExampleGroup) ||
other.ancestors.include?(RSpec::Rails::HelperExampleGroup)
end
end

Expand Down

0 comments on commit 2065d5c

Please sign in to comment.