Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/ms 850/shoulda matchers broken #44

Merged
merged 3 commits into from
Dec 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ cache: bundler
language: ruby
rvm:
- '2.1'
# JRuby failing for redcarpet and shoulda-matchers gems
# < 1.7.14
- 'jruby-1.7.13'
#- 'jruby-1.7.13'
# >= 1.7.14
- 'jruby-1.7.14'
#- 'jruby-1.7.14'
script: bundle exec rake spec yard
sudo: false
4 changes: 3 additions & 1 deletion lib/metasploit/model/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ module Version
# The minor version number, scoped to the {MAJOR} version number.
MINOR = 0
# The patch version number, scoped to the {MAJOR} and {MINOR} version numbers.
PATCH = 0
PATCH = 1

# the prerelease identifier
PRERELEASE = 'shoulda-matchers-broken'
#
# Module Methods
#
Expand Down
2 changes: 1 addition & 1 deletion spec/app/models/metasploit/model/search/group/base_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
RSpec.describe Metasploit::Model::Search::Group::Base, type: :model do
it { is_expected.to ensure_length_of(:children).is_at_least(1) }
it { is_expected.to validate_length_of(:children).is_at_least(1) }
end
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

context 'validations' do
context 'children' do
it { is_expected.to ensure_length_of(:children).is_at_least(1).with_short_message('is too short (minimum is 1 child)') }
it { is_expected.to validate_length_of(:children).is_at_least(1).with_short_message('is too short (minimum is 1 child)') }

context '#children_valid' do
subject(:children_valid) do
Expand Down
9 changes: 9 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,12 @@
Metasploit::Model::Spec.remove_temporary_pathname
end
end

Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.library :active_record
with.library :active_model

with.test_framework :rspec
end
end