changes to allow multiple orm features to run, pass for me, whoop whoop
This commit is contained in:
parent
7bf3249105
commit
1f430a0ca3
|
@ -0,0 +1,15 @@
|
||||||
|
When /^I create a widget in one orm$/ do
|
||||||
|
Widget.create!
|
||||||
|
end
|
||||||
|
|
||||||
|
When /^I create a widget in another orm$/ do
|
||||||
|
AnotherWidget.create!
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^I should see ([\d]+) widget in one orm $/ do |widget_count|
|
||||||
|
Widget.count.should == widget_count
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^I should see ([\d]+) widget in another orm$/ do |widget_count|
|
||||||
|
AnotherWidget.count.should == widget_count
|
||||||
|
end
|
|
@ -4,6 +4,7 @@ require 'spec/expectations'
|
||||||
require 'ruby-debug'
|
require 'ruby-debug'
|
||||||
|
|
||||||
orm = ENV['ORM']
|
orm = ENV['ORM']
|
||||||
|
another_orm = ENV['ANOTHER_ORM']
|
||||||
strategy = ENV['STRATEGY']
|
strategy = ENV['STRATEGY']
|
||||||
|
|
||||||
if orm && strategy
|
if orm && strategy
|
||||||
|
@ -14,6 +15,14 @@ if orm && strategy
|
||||||
raise "You don't have the #{orm} ORM installed"
|
raise "You don't have the #{orm} ORM installed"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if another_orm
|
||||||
|
begin
|
||||||
|
require "#{File.dirname(__FILE__)}/../../lib/#{another_orm}_models"
|
||||||
|
rescue LoadError => e
|
||||||
|
raise "You don't have the #{another_orm} ORM installed"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
$:.unshift(File.dirname(__FILE__) + '/../../../lib')
|
$:.unshift(File.dirname(__FILE__) + '/../../../lib')
|
||||||
require 'database_cleaner'
|
require 'database_cleaner'
|
||||||
require 'database_cleaner/cucumber'
|
require 'database_cleaner/cucumber'
|
||||||
|
|
Loading…
Reference in New Issue