From fb5dcde3737f3fd4ddcaa4fe029ec6b22db60165 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Sun, 2 Nov 2014 20:46:59 -0500 Subject: [PATCH 1/2] no require_relative --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7d28977..504a277 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -16,4 +16,4 @@ end require 'webmock/rspec' -require_relative '../lib/gist' +require 'gist' From 57a5812bcc2a029e93c05a06e722c94e899de411 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Sun, 2 Nov 2014 20:50:02 -0500 Subject: [PATCH 2/2] 1.8 hash syntax --- spec/ghe_spec.rb | 2 +- spec/gist_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/ghe_spec.rb b/spec/ghe_spec.rb index 807b30a..5d88a2f 100644 --- a/spec/ghe_spec.rb +++ b/spec/ghe_spec.rb @@ -63,7 +63,7 @@ it "uses them" do $stdin = StringIO.new "#{MOCK_USER}_wrong\n#{MOCK_PASSWORD}_wrong\n" - Gist.login! username: MOCK_USER, password: MOCK_PASSWORD + Gist.login! :username => MOCK_USER, :password => MOCK_PASSWORD assert_requested(:post, /#{MOCK_AUTHZ_GITHUB_URL}authorizations/) end diff --git a/spec/gist_spec.rb b/spec/gist_spec.rb index fbd5242..7c4472a 100644 --- a/spec/gist_spec.rb +++ b/spec/gist_spec.rb @@ -2,7 +2,7 @@ describe "should_be_public?" do it "should return false if -p is specified" do - Gist.should_be_public?(private: true).should be_falsy + Gist.should_be_public?(:private => true).should be_falsy end it "should return false if legacy_private_gister?" do @@ -12,7 +12,7 @@ it "should return true if --no-private is specified" do Gist.stub(:legacy_private_gister?).and_return(true) - Gist.should_be_public?(private: false).should be_truthy + Gist.should_be_public?(:private => false).should be_truthy end it "should return true by default" do