rspec-jasmine 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  This is a nice and handy, RSpec powered runner and reporter for Jasmine
4
4
  test suites. It's simpler and more flexible than stuff provided by `jasmine`
5
- gem.
5
+ gem. Here's how it looks like:
6
+
7
+ ![Screenshot](https://raw.github.com/nu7hatch/rspec-jasmine/master/example/screenshot.png)
6
8
 
7
9
  NOTE: It works only with RSpec 2.0 and higher.
8
10
 
Binary file
@@ -1,5 +1,6 @@
1
1
  ENV['RACK_ENV'] == 'test'
2
2
 
3
+ $LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
3
4
  require 'rspec'
4
5
 
5
6
  RSpec.configure do |conf|
@@ -16,7 +16,7 @@ module RSpec
16
16
  begin
17
17
  @example_group_instance.instance_eval(&@example_block)
18
18
  @result = @example_group_instance.instance_variable_get('@result')
19
- @result.screem! if @result
19
+ @result.scream! if @result
20
20
  rescue RSpec::Core::Pending::PendingDeclaredInExample => e
21
21
  @pending_declared_in_example = e.message
22
22
  rescue Exception => e
@@ -37,6 +37,12 @@ module RSpec
37
37
  set_exception(e, "while assigning the example description")
38
38
  end
39
39
  end
40
+
41
+ class << self.metadata
42
+ def location
43
+ caller.find { |x| x =~ /\<top \(required\)\>/ }.split(/\:\d+\:in/)[0]
44
+ end
45
+ end
40
46
 
41
47
  @result.merge_backtrace_with!(exception) if exception
42
48
  finish(reporter)
@@ -35,7 +35,7 @@ module RSpec
35
35
  end
36
36
  end
37
37
 
38
- def screem!
38
+ def scream!
39
39
  if failed?
40
40
  raise RSpec::Expectations::ExpectationNotMetError.new(error_message)
41
41
  end
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module Jasmine
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-jasmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-20 00:00:00.000000000 Z
12
+ date: 2012-07-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -101,6 +101,7 @@ files:
101
101
  - example/public/src/Player.js
102
102
  - example/public/src/Song.js
103
103
  - example/public/tests.html
104
+ - example/screenshot.png
104
105
  - example/spec/jasmine.rb
105
106
  - example/spec/spec_helper.rb
106
107
  - lib/rspec-jasmine.rb