Skip to content

Commit

Permalink
fix rspecs
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieujobin committed Aug 19, 2017
1 parent 064077e commit 4ffa752
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Gemfile
@@ -1,3 +1,7 @@
source "http://rubygems.org"

# Bundler 1.x default to insecure http:// for github: shortcut
git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }

gemspec
gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
14 changes: 10 additions & 4 deletions Gemfile.lock
@@ -1,8 +1,15 @@
GIT
remote: https://github.com/mathieujobin/fabrication.git
revision: 923cf6fcefd0566b1d6be7bd2f685b89388f4800
ref: 923cf6fcefd0566b1d6be7bd2f685b89388f4800
specs:
fabrication (2.16.2)

PATH
remote: .
specs:
pickle (0.5.2)
cucumber
pickle (0.5.3)
cucumber (>= 0.8, < 3.0)
rake

GEM
Expand Down Expand Up @@ -74,7 +81,6 @@ GEM
database_cleaner (1.6.1)
diff-lcs (1.3)
erubis (2.7.0)
fabrication (2.16.2)
factory_girl (4.8.0)
activesupport (>= 3.0.0)
gherkin (4.1.3)
Expand Down Expand Up @@ -167,7 +173,7 @@ DEPENDENCIES
capybara
cucumber-rails
database_cleaner
fabrication (~> 2.0)
fabrication!
factory_girl
git
machinist
Expand Down
6 changes: 3 additions & 3 deletions pickle.gemspec
Expand Up @@ -6,10 +6,10 @@ Gem::Specification.new do |s|
s.version = Pickle::VERSION.dup
s.platform = Gem::Platform::RUBY
s.licenses = ["MIT"]
s.authors = ["Ian White", "James Le Cuirot"]
s.authors = ["Ian White", "James Le Cuirot", "Mathieu Jobin"]
s.description = "Easy model creation and reference in your cucumber features"
s.summary = "Easy model creation and reference in your cucumber features."
s.email = ["ian.w.white@gmail.com", "chewi@aura-online.co.uk"]
s.email = ["ian.w.white@gmail.com", "chewi@aura-online.co.uk", "mathieu.jobin@gmail.com"]
s.homepage = "https://github.com/ianwhite/pickle"

s.rubyforge_project = "pickle"
Expand All @@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_paths = ["lib"]

s.add_dependency "cucumber" # , ">=0.8"
s.add_dependency "cucumber", ">=0.8", "< 3.0"
s.add_dependency "rake"

s.add_development_dependency "rack"
Expand Down
2 changes: 1 addition & 1 deletion spec/pickle/email_spec.rb
Expand Up @@ -162,7 +162,7 @@
it "should not raise an error when the email body is not a string, but needs to_s [#26]" do
allow(self).to receive(:visit)
allow(@email1).to receive(:body).and_return(:a_string_body)
expect { click_first_link_in_email(@email1) }.not_to raise_error
click_first_link_in_email(@email1)
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/pickle/session_spec.rb
Expand Up @@ -37,7 +37,7 @@ class Model
end

it "should raise error if pickle_parser don't know about em" do
expect { subject.parse_infinity }.to raise_error
expect { subject.parse_infinity }.to raise_error(NoMethodError, /^undefined method `parse_infinity' for /)
end
end

Expand Down Expand Up @@ -391,7 +391,7 @@ def do_create_users
end

it "#parser.parse_fields 'author: user \"JIM\"' should raise Error, as model deos not refer" do
expect { pickle_parser.parse_fields('author: user "JIM"') }.to raise_error
expect { pickle_parser.parse_fields('author: user "JIM"') }.to raise_error(Pickle::Session::ModelNotKnownError, %q[The model: 'user "JIM"' is not known in this scenario. Use #create_model to create, or #find_model to find, and store a reference in this scenario.])
end

it "#parser.parse_fields 'author: the user' should return {\"author\" => <user>}" do
Expand Down

0 comments on commit 4ffa752

Please sign in to comment.