fix failing tests, ugly solution that should be handled by rspec in the future

This commit is contained in:
2012-06-25 11:02:47 +02:00
parent 0a10dada4d
commit e71ab89984
10 changed files with 129 additions and 83 deletions
+13
View File
@@ -0,0 +1,13 @@
require 'spec_helper'
describe Cmtool::PagesController do
describe 'GET index' do
it "should render standard view when tree is available" do
#binding.pry
create_pages_tree
->{ get :index }.should_not raise_error
end
end
end
+1 -1
View File
@@ -3,7 +3,7 @@ development:
database: cmtool
test:
validation_framework: :active_model #optional
database: cmtool
database: cmtool_test
production:
validation_framework: :active_model #optional
database: cmtool
+10
View File
@@ -0,0 +1,10 @@
Dummy::Application.configure do
# Use Pry instead of IRB
silence_warnings do
begin
require 'pry'
IRB = Pry
rescue LoadError
end
end
end
+5
View File
@@ -19,6 +19,7 @@ Capybara.default_driver = :selenium
RSpec.configure do |config|
config.mock_with :rspec
config.include FactoryGirl::Syntax::Methods
#config.application = Cmtool::Engine
#config.include CompanyFactory
config.include Cmtool::Engine.routes.url_helpers
config.include Devise::TestHelpers, :type => :controller
@@ -35,6 +36,10 @@ RSpec.configure do |config|
#render_views
end
config.before :each do
@routes = Cmtool::Engine.routes
end
config.before :all do
end
config.before :each, type: :request do