I hereby claim:
- I am jonhoman on github.
- I am hatch_jon (https://keybase.io/hatch_jon) on keybase.
- I have a public key ASBMv7gweZy1ZMDTI6BdgBZGk1NrHEpvYYK5qj34C7J3Vgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# app/models/user.rb | |
class User < ActiveRecord::Base | |
has_many :profiles | |
accepts_nested_attributes_for :profiles | |
end | |
# app/models/profile.rb | |
class Profile < ActiveRecord::Base | |
belongs_to :user | |
end |
WebMock.should have_requested(:get, "www.example.com") | |
WebMock.should have_requested(:get, "www.example.com").twice | |
WebMock.should have_requested(:post, "www.example.com").with(:headers => 'Content-Type' => 'application/json') |
Given /^I have a feed I want to edit$/ do | |
VCR.use_cassette("feed") do | |
@feed = Factory :feed | |
end | |
end |
describe Feed do | |
let :feed do | |
Factory :feed | |
end | |
it "is not valid without a name" do | |
feed.name = nil | |
feed.should_not be_valid | |
end | |
end |
--- | |
- !ruby/struct:VCR::HTTPInteraction | |
request: !ruby/struct:VCR::Request | |
method: :get | |
uri: http://api.bit.ly:80/v3/clicks?apiKey=R_504029652b3e3b641ac2ad781723c96a&hash=fXEv5E&login=jonhoman | |
body: | |
headers: | |
response: !ruby/struct:VCR::Response | |
status: !ruby/struct:VCR::ResponseStatus | |
code: 200 |
describe "GET 'connect'" do | |
before do | |
stub_oauth_request_token! | |
end | |
it "should redirect to twitter authorization url" do | |
get 'connect' | |
session[:request_token].should == 't' | |
session[:request_token_secret].should == 's' |
let(:test) { puts "Hello" } | |
it "should print hello" do | |
test | |
end | |
it "should not print hello" do | |
end | |
#output |
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please use ::Rails.root.to_s. (called from join at /Users/obtiva/dev/personal/lifestreams/vendor/plugins/lazy_developer/lib/tasks/rcov.rake:3) |
puts build_date | |
# Sun Dec 19 10:35:26 -0600 2010 | |
puts build_date.class | |
# Time | |
# This works | |
feed.update_attributes!(:name => name, :last_build_date => build_date.to_s) | |
# This fails with wrong number of arguments (1 for 0) |