Last active
December 14, 2015 03:19
-
-
Save remi/5019778 to your computer and use it in GitHub Desktop.
Revisions
-
remi revised this gist
Feb 23, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ describe ReportsController do subject { last_response } describe :create do let(:payload) { { :serial => serial, :version => "1.0.0" } } before { post reports_path, payload.to_json } -
remi revised this gist
Feb 23, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ describe ReportsController do describe :create do let(:payload) { { :serial => serial, :version => "1.0.0" } } before { post reports_path, payload.to_json } context "with present serial" do let(:serial) { "123abc" } -
remi revised this gist
Feb 23, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,14 +7,14 @@ let(:serial) { "123abc" } it { should be_ok } its(:status) { should eq 200 } end context "with missing serial" do let(:serial) { nil } it { should_not be_ok } its(:status) { should eq 400 } end end end -
remi created this gist
Feb 23, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ describe ReportsController do describe :create do let(:payload) { { :serial => serial, :version => "1.0.0" } } before { post "/reports", payload.to_json } context "with present serial" do let(:serial) { "123abc" } it { should be_ok } its(:status) { should eq 200 } end context "with missing serial" do let(:serial) { nil } it { should_not be_ok } its(:status) { should eq 400 } end end end