fix failing tests, ugly solution that should be handled by rspec in the future
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user