Skip to content

Instantly share code, notes, and snippets.

describe 'PUT #update' do
let!(:user) { create(:user_complete_profile) }
let(:params) { { user: { id: user.id, email: '[email protected]' } } }
before do
sign_in user
session[:return_to] = projects_path
end
it 'we should be on projects path' do
class Foo
attr_reader :bar
def change_bar
bar ? @bar = false : @bar = true
end
end
describe 'Foo' do
let(:foo) { Foo.new }
# fizzbuzz.rb
def fizzbuzz(number)
return "FizzBuzz" if number % 3 == 0 && number % 5 == 0
return "Fizz" if number % 3 == 0
return "Buzz" if number % 5 == 0
number
end
# fizzbuzz_spec.rb
require './fizzbuzz'