Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Increase code coverage

  • Loading branch information...
commit 57ca2c05ffe25f356f3c994841be988940fe8a51 1 parent 5b5b98e
@ledermann authored
Showing with 11 additions and 0 deletions.
  1. +7 −0 spec/settings_spec.rb
  2. +4 −0 spec/spec_helper.rb
View
7 spec/settings_spec.rb
@@ -203,6 +203,13 @@
expect(user.settings?).to eq(false)
end
+
+ it "should raise exception on assigning other than nil" do
+ expect {
+ user.settings = :foo
+ user.save!
+ }.to raise_error(ArgumentError)
+ end
end
describe "Customized SettingObject" do
View
4 spec/spec_helper.rb
@@ -29,6 +29,10 @@
config.before(:each) do
clear_db
end
+
+ config.after :suite do
+ RailsSettingsMigration.migrate(:down)
+ end
end
require 'active_record'
Please sign in to comment.
Something went wrong with that request. Please try again.