Permalink
Browse files

gem version 0.1.8 released

  • Loading branch information...
1 parent 79fa77e commit 568f9db95cb730640c8752e17ba5c18ea6458572 @ianwhite committed Jan 29, 2009
Showing with 79 additions and 18 deletions.
  1. +1 −1 History.txt
  2. +74 −13 SPECDOC
  3. +1 −1 lib/pickle/version.rb
  4. +3 −3 pickle.gemspec
View
@@ -1,4 +1,4 @@
-== Edge
+== 0.1.8 - 29 Jan 2009
* API change
* pickle_path becomes path_to_pickle, to avoid named route clashes
View
87 SPECDOC
@@ -2,7 +2,7 @@
Pickle::Adapter
- .factories should raise NotImplementedError
- #create should raise NotImplementedError
-- .model_classes should not include CGI::Session::ActiveRecordStore
+- .model_classes should not include ActiveRecord::SessionStore::Session
Pickle::Adapter ::ActiveRecord.factories
- should create one for each active record class
@@ -33,7 +33,6 @@ Pickle::Adapter ::Machinist.factories.new(Class, 'make_special')
Pickle::Config
- #adapters should default to :machinist, :factory_girl, :active_record
- #adapter_classes should default to Adapter::Machinist, Adapter::FactoryGirl, Adapter::ActiveRecord
-- #factory_names should be keys of #factories
- #mappings should default to []
- #configure(&block) should execiute on self
@@ -46,18 +45,61 @@ Pickle::Config#factories
- should give preference to adaptors first in the list
Pickle::Config#predicates
-- should be list of all ? public instance methods + columns methods of Adapter.model_classes
+- should be list of all non object ? public instance methods + columns methods of Adapter.model_classes
- should be overridable
Pickle::Config#map 'foo', :to => 'faz'
- should create OpenStruct(search: 'foo', replace: 'faz') mapping
Pickle::Config#map 'foo', 'bar' :to => 'faz'
-- should create OpenStruct(search: '(?:foo|bar)', replace: 'faz') mapping
-
-Pickle::Injector.inject Pickle::Session, :into => <a class>
-- object should respond_to Pickle:Session methods
-- object.model (a pickle method) should call object.pickle_session.model
+- should create 2 mappings
+
+Pickle::Email::Parser
+- #capture_email should just capture match_email
+
+Pickle::Email::Parser#match_email
+- should match 'the email'
+- should match 'the first email'
+- should match 'the last email'
+- should match 'the 3rd email'
+- should match 'an email'
+
+Pickle::Email::Parser#capture_index_in_email
+- should extract the '2nd' from 'the 2nd email'
+- should extract nil from 'the email'
+- should extract the 'last' from 'the last email'
+
+Pickle::Email#emails
+- should return ordered deliveries
+
+Pickle::Email#emails (after)
+- #email('the email') should return the last delivery
+- #email('the 1st email') should return the first delivery
+- #email('the first email') should return the first delivery
+- #email('the 2nd email') should return the second delivery
+- #email('the last email') should return the second delivery
+- #email2('the 3rd email') should be nil
+
+Pickle::Email#emails when email1 is to fred & joe, and email2 is to joe
+- #emails('to: "fred@gmail.com"') should just return email1
+- #emails('to: "joe@gmail.com"') should return both emails
+
+Pickle::Email#emails when email1 is to fred & joe, and email2 is to joe after #emails('to: "fred@gmail.com"')
+- #email('first') should be #email('last')
+- #email('the email', 'to: "blah") should be nil
+- #email('the email', 'to: "fred@gmail.com") should be email1
+
+Pickle::Email#emails when email1 is to fred & joe, and email2 is to joe and emails have subjects 'email1', 'email2'
+- #emails('to: "joe@gmail.com", subject: "email1"') should return email1
+- #emails('to: "fred@gmail.com", subject: "email2"') should return empty array
+
+Pickle::Email#save_and_open_emails
+- should call #emails to get emails
+- should create a file in Rails/tmp with the emails in it
+- should call open_in_browser on created tmp file
+
+Pickle::Email#save_and_open_emails when emails have been already been found
+- should not call #emails
Pickle::Parser::Matchers (config: [factories: user, car, fast_car] [predicates: name, status, fancy?, super_fancy?] Match atoms
- match_ordinal should match '1st'
@@ -162,6 +204,28 @@ Pickle::Parser customised mappings config maps 'I|myself' to 'user: "me"'
- parse_model('I') should == ['user', 'me']
- parse_model('myself') should == ['user', 'me']
+Pickle::Path#path_to_pickle
+- ('a user', 'the user: "fred"') should retrieve 'a user', and 'the user: "fred"' models
+- ('a user', :action => 'foo') should return foo_user_path(<user>)
+- ('a user', :action => 'foo') should raise informative error if foo_user_path not defined
+- ('a user', :segment => 'foo') should return user_foo_path(<user>)
+- ('a user', :segment => 'foo') should raise informative error if foo_user_path not defined
+- ('a user', :action => 'new', :segment => 'comment') should return new_user_comment_path(<user>)
+- ('a user', :action => 'new', :segment => 'comment') should raise informative error if new_user_comment_path not defined
+- ('a user', :extra => 'new comment') should return new_user_comment_path(<user>)
+- ('a user', :extra => 'new comment') should raise informative error if new_user_comment_path not defined
+
+Pickle::Path#path_to_pickle (private API)
+- ('a user', :extra => 'new ish comment') should try combinations of 'new', 'ish', 'comment'
+
+Pickle::Session including Pickle::Session
+- should forward to pickle_parser it responds_to them
+- should raise error if pickle_parser don't know about em
+
+Pickle::Session extending Pickle::Session
+- should forward to pickle_parser it responds_to them
+- should raise error if pickle_parser don't know about em
+
Pickle::Session#create_model ('a user')
- should call Factory.create('user', {})
@@ -260,9 +324,6 @@ Pickle::Session#find_models after find, (found from db) user should be retrievab
- model('1st user')
- model('last user')
-Pickle::Session#clear_models(<factory_name>)
-- should clear the storage for that factory name
-
Pickle::Session creating 'a super admin: "fred"', then 'a user: "shirl"', 'then 1 super_admin'
- should call Factory.create with <'super_admin'>, <'user'>, <'super_admin'>
@@ -301,6 +362,6 @@ Pickle
- .parser should create a parser with the default config
- .parser should be same object on multiple calls
-Finished in 0.752032 seconds
+Finished in 0.898 seconds
-188 examples, 0 failures
+225 examples, 0 failures
View
@@ -2,7 +2,7 @@ module Pickle
module Version
Major = 0
Minor = 1
- Tiny = 6
+ Tiny = 8
String = [Major, Minor, Tiny].join('.')
end
View
@@ -2,14 +2,14 @@
Gem::Specification.new do |s|
s.name = %q{pickle}
- s.version = "0.1.6"
+ s.version = "0.1.8"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ian White"]
- s.date = %q{2009-01-24}
+ s.date = %q{2009-01-29}
s.description = %q{Easy model creation and reference in your cucumber features}
s.email = %q{ian.w.white@gmail.com}
- s.files = ["lib/pickle/adapter.rb", "lib/pickle/config.rb", "lib/pickle/email/parser.rb", "lib/pickle/email/world.rb", "lib/pickle/email.rb", "lib/pickle/parser/matchers.rb", "lib/pickle/parser.rb", "lib/pickle/path/world.rb", "lib/pickle/path.rb", "lib/pickle/session/parser.rb", "lib/pickle/session.rb", "lib/pickle/version.rb", "lib/pickle/world.rb", "lib/pickle.rb", "rails_generators/pickle/pickle_generator.rb", "rails_generators/pickle/templates/env.rb", "rails_generators/pickle/templates/pickle_email_steps.rb", "rails_generators/pickle/templates/pickle_path_steps.rb", "rails_generators/pickle/templates/pickle_steps.rb", "License.txt", "README.textile", "Todo.txt", "History.txt", "spec/lib/pickle_adapter_spec.rb", "spec/lib/pickle_config_spec.rb", "spec/lib/pickle_email_parser_spec.rb", "spec/lib/pickle_email_spec.rb", "spec/lib/pickle_parser_matchers_spec.rb", "spec/lib/pickle_parser_spec.rb", "spec/lib/pickle_path_spec.rb", "spec/lib/pickle_session_spec.rb", "spec/lib/pickle_spec.rb"]
+ s.files = ["lib/pickle/adapter.rb", "lib/pickle/config.rb", "lib/pickle/email/parser.rb", "lib/pickle/email/world.rb", "lib/pickle/email.rb", "lib/pickle/parser/matchers.rb", "lib/pickle/parser.rb", "lib/pickle/path/world.rb", "lib/pickle/path.rb", "lib/pickle/session/parser.rb", "lib/pickle/session.rb", "lib/pickle/version.rb", "lib/pickle/world.rb", "lib/pickle.rb", "rails_generators/pickle/pickle_generator.rb", "rails_generators/pickle/templates/email_steps.rb", "rails_generators/pickle/templates/env.rb", "rails_generators/pickle/templates/paths.rb", "rails_generators/pickle/templates/pickle_steps.rb", "License.txt", "README.textile", "Todo.txt", "History.txt", "spec/lib/pickle_adapter_spec.rb", "spec/lib/pickle_config_spec.rb", "spec/lib/pickle_email_parser_spec.rb", "spec/lib/pickle_email_spec.rb", "spec/lib/pickle_parser_matchers_spec.rb", "spec/lib/pickle_parser_spec.rb", "spec/lib/pickle_path_spec.rb", "spec/lib/pickle_session_spec.rb", "spec/lib/pickle_spec.rb"]
s.has_rdoc = true
s.homepage = %q{http://github.com/ianwhite/pickle/tree}
s.rdoc_options = ["--title", "Pickle", "--line-numbers"]

0 comments on commit 568f9db

Please sign in to comment.