Skip to content

Instantly share code, notes, and snippets.

@jaredbrown
jaredbrown / Example of a Unit Test
Created February 19, 2014 17:34
Used in my blog post about unit testing on blog.hubstaff.com
describe 'PUT update_setting' do
it 'should not set the screenshot frequency to an invalid value' do
put_with user, :update_setting, { id: organization.to_param, setting: 'delete_screens_allowed', value: 100 }
organization.reload
organization.settings[:delete_screens_allowed].should_not be(100)
end
end