Skip to content

Commit

Permalink
Remove some more stub files now that opal parses them correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Nov 2, 2013
1 parent 3d40ed9 commit a8d4093
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
12 changes: 0 additions & 12 deletions README.md
Expand Up @@ -46,18 +46,6 @@ opal has to include all dependencies into build.

* **line 171**: `&::Time.method(:now)` doesnt work so wrong method is set

### rspec/core/example_group.rb

* **line 547**: opal cannot use mutable strings (see opal/rspec/fixes.rb)

* **line 564**: opal cannot use mutable strings (see opal/rspec/fixes.rb). Also, opal
does not support 2 regexp special characters yet (`\A` and `\z`).

### rspec/matchers/built_in/have.rb

* **line 1**: this is an error in rspec. This autoload does not exist so we must
stub the file.

## License

(The MIT License)
Expand Down
3 changes: 3 additions & 0 deletions Rakefile
Expand Up @@ -31,6 +31,9 @@ def build_rspec
Opal::Processor.stub_file asset
end

# bug in rspec? this autoload doesnt exist so we must stub it
Opal::Processor.stub_file 'rspec/matchers/built_in/have'

Opal.process('rspec-builder')
end

Expand Down
Empty file.
2 changes: 2 additions & 0 deletions opal/opal/rspec/fixes.rb
Expand Up @@ -31,6 +31,7 @@ def prefix_and_expected(symbol)
end

module RSpec::ExampleGroups
# opal cannot use mutable strings AND opal doesnt support `\A` or `\z` anchors
def self.base_name_for(group)
return "Anonymous" if group.description.empty?

Expand All @@ -48,6 +49,7 @@ def self.base_name_for(group)
name
end

# opal cannot use mutable strings
def self.disambiguate(name, const_scope)
return name unless const_scope.const_defined?(name)

Expand Down

0 comments on commit a8d4093

Please sign in to comment.