opal-rspec 0.4.0.beta4 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6ec1f1110451f412a61b923b32d640e293e2929
4
- data.tar.gz: 6aebaf694d03562bc10ff99c956dc53c7cb36155
3
+ metadata.gz: 2e46408c770b69f808a37b68ba95e7772bcf2f02
4
+ data.tar.gz: 62e577d34d96408f9a73a6c2545c0e97cc9943a1
5
5
  SHA512:
6
- metadata.gz: 1f07f2a9acaa17631c66fa1455670f07d7f05641786e4df60d1641d853818cc2b2ecc17e3379f4e068789ecde5a1df077f076685a9aef09bf8e82570c64ebfac
7
- data.tar.gz: 06559b78e1349be1765b9a14047f1b290e113b8a435c87fb02fd5c026e23676ad82892e15b3527a0ee27b3739bcfb4dc98aa7487fe892c4e2addd17dc38a1ab3
6
+ metadata.gz: 7e84f3bd88a92a3ec3ce35944615b4e4fcfd5c43f3b25033a0f0db92e5287dc1219d489ed5f77bd6bb5920b802ffa96b0c3f86b6e61e017b5bf6abddfb5dfeca
7
+ data.tar.gz: 944341e9395e507b981e71b3237e35bb19ad929b17c5cade5344daff617138104ff11dc6a90511a4bbca44517a5f07ead44ca2fccbfb0ab9e0ec585639de3e1b
data/Gemfile CHANGED
@@ -1,10 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
- gem 'opal', :github => 'opal/opal'
5
-
6
- gem 'rspec', :path => 'rspec'
7
- gem 'rspec-support', :path => 'rspec-support'
8
- gem 'rspec-core', :path => 'rspec-core'
9
- gem 'rspec-mocks', :path => 'rspec-mocks'
10
- gem 'rspec-expectations', :path => 'rspec-expectations'
4
+ gem 'rspec', path: 'rspec'
5
+ gem 'rspec-support', path: 'rspec-support'
6
+ gem 'rspec-core', path: 'rspec-core'
7
+ gem 'rspec-mocks', path: 'rspec-mocks'
8
+ gem 'rspec-expectations', path: 'rspec-expectations'
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # opal-rspec
2
2
 
3
+ [![Build Status](http://img.shields.io/travis/opal/opal-rspec/master.svg?style=flat)](http://travis-ci.org/opal/opal-rspec)
4
+
3
5
  An attempt at a compatibility layer of rspec for opal.
4
6
 
5
7
  [See the website for documentation](http://opalrb.org/docs/rspec/).
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module RSpec
3
- VERSION = '0.4.0.beta4'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
data/opal-rspec.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.require_paths = ['lib']
16
16
 
17
- s.add_dependency 'opal', '~> 0.7.0.beta1'
17
+ s.add_dependency 'opal', '0.7.0'
18
18
  s.add_development_dependency 'rake'
19
19
  s.add_development_dependency 'yard'
20
20
  end
@@ -1,19 +1,3 @@
1
- # IO.closed? missing - BaseFormatter uses it for sync impl
2
- class IO
3
- def closed?
4
- false
5
- end
6
- end
7
-
8
- # Opal defines enumerable#flat_map, but doesnt implement it
9
- module RSpec::Core::FlatMap
10
- def flat_map(array)
11
- array.map { |item| yield item }.flatten
12
- end
13
-
14
- module_function :flat_map
15
- end
16
-
17
1
  # This breaks on 2.0.0, so it is here ready for when opal bumps to 2.0.0
18
2
  class RSpec::CallerFilter
19
3
  def self.first_non_rspec_line
@@ -21,26 +5,14 @@ class RSpec::CallerFilter
21
5
  end
22
6
  end
23
7
 
24
- # String#<< is not supported by Opal
25
- module RSpec::Expectations
26
- def self.fail_with(message, expected = nil, actual = nil)
27
- if !message
28
- raise ArgumentError, "Failure message is nil. Does your matcher define the " +
29
- "appropriate failure_message_for_* method to return a string?"
30
- end
31
-
32
- raise RSpec::Expectations::ExpectationNotMetError.new(message)
33
- end
34
- end
35
-
36
8
  # Opal does not support mutable strings
37
9
  module RSpec
38
10
  module Matchers
39
11
  module Pretty
40
12
  def underscore(camel_cased_word)
41
- word = camel_cased_word.to_s.dup
42
- word = word.gsub(/([A-Z]+)([A-Z][a-z])/,'$1_$2')
43
- word = word.gsub(/([a-z\d])([A-Z])/,'$1_$2')
13
+ word = camel_cased_word.to_s
14
+ word = word.gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2')
15
+ word = word.gsub(/([a-z\d])([A-Z])/,'\1_\2')
44
16
  word = word.tr("-", "_")
45
17
  word = word.downcase
46
18
  word
@@ -63,7 +35,7 @@ module RSpec::ExampleGroups
63
35
 
64
36
  # Ruby requires first const letter to be A-Z. Use `Nested`
65
37
  # as necessary to enforce that.
66
- name = name.gsub(/^([^A-Z]|$)/, 'Nested$1')
38
+ name = name.gsub(/^([^A-Z]|$)/, 'Nested\1')
67
39
 
68
40
  name
69
41
  end
data/spec/example_spec.rb CHANGED
@@ -151,3 +151,13 @@ describe "let on an inner scope" do
151
151
  end
152
152
  end
153
153
  end
154
+
155
+ describe "#context" do
156
+ context "inner context" do
157
+ let(:foo) { :bar }
158
+
159
+ it "should still work" do
160
+ foo.should eq(:bar)
161
+ end
162
+ end
163
+ end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.beta4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Beynon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-07 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.0.beta1
19
+ version: 0.7.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.0.beta1
26
+ version: 0.7.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -246,9 +246,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
246
246
  version: '0'
247
247
  required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  requirements:
249
- - - ">"
249
+ - - ">="
250
250
  - !ruby/object:Gem::Version
251
- version: 1.3.1
251
+ version: '0'
252
252
  requirements: []
253
253
  rubyforge_project:
254
254
  rubygems_version: 2.4.3