Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Commit

Permalink
Merge pull request #39 from Factlink/pavlov-0.1.2
Browse files Browse the repository at this point in the history
Don't call query, command, interactor from old_* anymore
  • Loading branch information
markijbema committed Aug 5, 2013
2 parents ac3162c + 4d27bef commit fb0da47
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
14 changes: 14 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## before 0.1.3

* change tests which expect invocations of validations to tests which check whether an error has been thrown when you give it invalid input.
* change tests where you check whether authorized? is called, to ones where you invoke the operation unauthorized, and check if an error is thrown.
* always call arguments, also when the operation has no arguments. Then just invoke arguments without any arguments.

## 0.1.2

* change all your specs/test to expect `old_command`, `old_query` and `old_interactor` instead of `command`, `query` and `interactor`

## before 0.1.2

* change all tests to expect `command`, `query` and `interactor` to be called on the module Pavlov, instead of on the object under test.

## 0.1.1

* Where you require pavlov, also require 'pavlov/alpha_compatibility'
Expand Down
17 changes: 11 additions & 6 deletions lib/pavlov/alpha_compatibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@ def self.old_interactor *arguments
end

module Helpers
def old_interactor *args
interactor *args
def old_interactor name, *args
args = add_pavlov_options args
Pavlov.old_interactor name, *args
end
def old_command *args
command *args

def old_query name, *args
args = add_pavlov_options args
Pavlov.old_query name, *args
end
def old_query *args
query *args

def old_command name, *args
args = add_pavlov_options args
Pavlov.old_command name, *args
end
end
end
2 changes: 1 addition & 1 deletion lib/pavlov/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module Pavlov
# We're doing this because we might write tests that deal
# with other versions of bundler and we are unsure how to
# handle this better.
VERSION = "0.1.1"
VERSION = "0.1.2"
end

0 comments on commit fb0da47

Please sign in to comment.