From 2f880ac002528cdf86bdc300d80f9c04155be8a7 Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Mon, 16 Jul 2012 00:04:09 +0300 Subject: [PATCH] update fabrication gem --- Gemfile | 2 +- Gemfile.lock | 4 ++-- spec/fabricators/app_fabricator.rb | 6 +++--- spec/fabricators/comment_fabricator.rb | 4 ++-- spec/fabricators/err_fabricator.rb | 6 +++--- spec/fabricators/issue_tracker_fabricator.rb | 2 +- spec/fabricators/problem_fabricator.rb | 2 +- spec/fabricators/sequences_fabricator.rb | 1 - 8 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 245522e..5d12202 100644 --- a/Gemfile +++ b/Gemfile @@ -28,7 +28,7 @@ gem 'hoptoad_notifier', "~> 2.4" gem 'actionmailer_inline_css', "~> 1.3.0" gem 'kaminari' gem 'rack-ssl-enforcer' -gem 'fabrication', "~> 1.3.0" # Both for tests, and loading demo data +gem 'fabrication', "~> 2.0" # Both for tests, and loading demo data gem 'rails_autolink', '~> 1.0.9' platform :ruby do diff --git a/Gemfile.lock b/Gemfile.lock index ee859b2..b5bcf37 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -74,7 +74,7 @@ GEM eventmachine (0.12.10) execjs (1.4.0) multi_json (~> 1.0) - fabrication (1.3.2) + fabrication (2.1.0) faraday (0.8.1) multipart-post (~> 1.1) faraday_middleware (0.8.7) @@ -275,7 +275,7 @@ DEPENDENCIES devise (~> 1.5.3) email_spec execjs - fabrication (~> 1.3.0) + fabrication (~> 2.0) haml hoptoad_notifier (~> 2.4) htmlentities (~> 4.3.0) diff --git a/spec/fabricators/app_fabricator.rb b/spec/fabricators/app_fabricator.rb index 30e1c25..8c89c28 100644 --- a/spec/fabricators/app_fabricator.rb +++ b/spec/fabricators/app_fabricator.rb @@ -7,18 +7,18 @@ Fabricator(:app_with_watcher, :from => :app) do end Fabricator(:watcher) do - app! + app watcher_type 'email' email { sequence(:email){|n| "email#{n}@example.com"} } end Fabricator(:user_watcher, :from => :watcher) do - user! + user watcher_type 'user' end Fabricator(:deploy) do - app! + app username 'clyde.frog' repository 'git@github.com/errbit/errbit.git' environment 'production' diff --git a/spec/fabricators/comment_fabricator.rb b/spec/fabricators/comment_fabricator.rb index b8d496f..e96d1de 100644 --- a/spec/fabricators/comment_fabricator.rb +++ b/spec/fabricators/comment_fabricator.rb @@ -1,6 +1,6 @@ Fabricator :comment do - user! + user body 'Test comment' - err!(:fabricator => :problem) + err(:fabricator => :problem) end diff --git a/spec/fabricators/err_fabricator.rb b/spec/fabricators/err_fabricator.rb index 2b92461..e921396 100644 --- a/spec/fabricators/err_fabricator.rb +++ b/spec/fabricators/err_fabricator.rb @@ -1,13 +1,13 @@ Fabricator :err do - problem! - error_class! { 'FooError' } + problem + error_class { 'FooError' } component 'foo' action 'bar' environment 'production' end Fabricator :notice do - err! + err message 'FooError: Too Much Bar' backtrace { random_backtrace } server_environment { {'environment-name' => 'production'} } diff --git a/spec/fabricators/issue_tracker_fabricator.rb b/spec/fabricators/issue_tracker_fabricator.rb index f745bc0..175a44c 100644 --- a/spec/fabricators/issue_tracker_fabricator.rb +++ b/spec/fabricators/issue_tracker_fabricator.rb @@ -1,5 +1,5 @@ Fabricator :issue_tracker do - app! + app api_token { sequence :word } project_id { sequence :word } account { sequence :word } diff --git a/spec/fabricators/problem_fabricator.rb b/spec/fabricators/problem_fabricator.rb index 80d8fa0..04d7bf5 100644 --- a/spec/fabricators/problem_fabricator.rb +++ b/spec/fabricators/problem_fabricator.rb @@ -1,5 +1,5 @@ Fabricator(:problem) do - app! { Fabricate(:app) } + app comments { [] } end diff --git a/spec/fabricators/sequences_fabricator.rb b/spec/fabricators/sequences_fabricator.rb index 561be74..5ec7758 100644 --- a/spec/fabricators/sequences_fabricator.rb +++ b/spec/fabricators/sequences_fabricator.rb @@ -1,3 +1,2 @@ Fabricate.sequence(:name) {|n| "John #{n} Doe"} Fabricate.sequence(:word) {|n| "word#{n}"} - -- libgit2 0.21.2