2014-10-27 00:52:55 +00:00
|
|
|
require 'acceptance_spec_helper'
|
|
|
|
|
|
|
|
describe 'shoulda-matchers integrates with an ActiveModel project' do
|
|
|
|
specify 'and loads without errors' do
|
|
|
|
create_active_model_project
|
|
|
|
|
2014-10-23 00:54:36 +00:00
|
|
|
add_shoulda_matchers_to_project(
|
|
|
|
test_frameworks: [:rspec],
|
2015-05-07 04:43:35 +00:00
|
|
|
libraries: [:active_model]
|
2014-10-23 00:54:36 +00:00
|
|
|
)
|
2014-10-27 00:52:55 +00:00
|
|
|
|
|
|
|
write_file 'load_dependencies.rb', <<-FILE
|
|
|
|
require 'active_model'
|
|
|
|
require 'shoulda-matchers'
|
|
|
|
|
|
|
|
puts ActiveModel::VERSION::STRING
|
|
|
|
puts "Loaded all dependencies without errors"
|
|
|
|
FILE
|
|
|
|
|
2014-12-25 04:43:33 +00:00
|
|
|
result = run_command_within_bundle('ruby load_dependencies.rb')
|
2014-10-27 00:52:55 +00:00
|
|
|
expect(result).to have_output('Loaded all dependencies without errors')
|
|
|
|
end
|
|
|
|
end
|