diff --git a/README.markdown b/README.markdown index d469e77..8ddf9ae 100644 --- a/README.markdown +++ b/README.markdown @@ -347,6 +347,8 @@ There are spy-specfic matchers that are very handy. `wasNotCalledWith(arguments)` returns true if the object is a spy and was not called with the passed arguments +Spies can be trained to respond in a variety of ways when invoked: + `andCallThrough()`: spies on AND calls the original function spied on `andReturn(arguments)`: returns passed arguments when spy is called @@ -355,6 +357,8 @@ There are spy-specfic matchers that are very handy. `andCallFake(function)`: calls passed function when spy is called +Spies have some useful properties: + `callCount`: returns number of times spy was called `mostRecentCall.args`: returns argument array from last call to spy. diff --git a/Rakefile b/Rakefile index bcadfe1..64d7cdb 100644 --- a/Rakefile +++ b/Rakefile @@ -2,7 +2,7 @@ desc 'Builds lib/jasmine from source' task :build do # these files must be better - sources = ["src/base.js", "src/util.js", "src/Env.js"] + sources = ["src/base.js", "src/util.js", "src/Env.js", "src/ActionCollection.js", "src/Reporter.js"] sources += Dir.glob('src/*.js').reject{|f| sources.include?(f)} diff --git a/doc/files.html b/doc/files.html index 997edb9..b997fff 100644 --- a/doc/files.html +++ b/doc/files.html @@ -190,12 +190,20 @@ ul.inheritsList