2014-10-26 20:52:55 -04: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-22 20:54:36 -04:00
|
|
|
add_shoulda_matchers_to_project(
|
|
|
|
test_frameworks: [:rspec],
|
2020-01-01 15:20:50 -05:00
|
|
|
libraries: [:active_model],
|
2014-10-22 20:54:36 -04:00
|
|
|
)
|
2014-10-26 20:52:55 -04: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-24 23:43:33 -05:00
|
|
|
result = run_command_within_bundle('ruby load_dependencies.rb')
|
2014-10-26 20:52:55 -04:00
|
|
|
expect(result).to have_output('Loaded all dependencies without errors')
|
|
|
|
end
|
|
|
|
end
|