Skip to content

Commit

Permalink
Remove remaining fixes as all pushed upstream to opal
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 9, 2013
1 parent 1ee5120 commit 6130693
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 182 deletions.
28 changes: 3 additions & 25 deletions app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,6 @@ def for(a)
end
end

rspec_config = RSpec.configuration

# mock frameworks currently broken, so skip for now
# UPDATE: is this fixed by module.new fix?
def rspec_config.configure_mock_framework
nil
end

# something wrong with mocks? (to do with the above? probably...)
class RSpec::Core::ExampleGroup
def teardown_mocks_for_rspec
nil
end

alias_method :setup_mocks_for_rspec, :teardown_mocks_for_rspec
alias_method :verify_mocks_for_rspec, :teardown_mocks_for_rspec
end

describe "Adam" do
it "should eat" do
1.should == 1
Expand All @@ -76,12 +58,9 @@ def initialize(options={}, configuration=RSpec::configuration, world=RSpec::worl
end

def run(err, out)
# load specs here!
# load specs by the time this runs!
@configuration.error_stream = err
@configuration.output_stream ||= out
#@options.configure(@configuration)
# @configuration.load_spec_files
# @world.announce_filters

puts "Examples to run: #{@world.example_count}"
begin
Expand All @@ -98,11 +77,10 @@ def reporter
@reporter = BasicObject.new
def @reporter.method_missing(*args); Kernel.p args; end
def @reporter.example_failed(example)
Kernel.puts "FAILED: #{example.description}"
#Kernel.puts example.inspect
exception = example.metadata[:execution_result][:exception]

Kernel.puts "FAILED: #{example.description}"
Kernel.puts "#{exception.class.name}: #{exception.message}"
# `console.log(exception.stack)`
end

def @reporter.example_started(example)
Expand Down
9 changes: 8 additions & 1 deletion app/opal-rspec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
require 'opal-rspec/opal_fixes'
require 'file'
require 'dir'
require 'thread'

require 'rspec/core'
require 'rspec/mocks'
require 'rspec-expectations'

# For now, we don't support mocking. This placeholder in rspec-core allows that.
# use any mocking. win.
require 'rspec/core/mocking/with_absolutely_nothing'

# String#<< is not supported by Opal
module RSpec::Expectations
def self.fail_with(message, expected = nil, actual = nil)
Expand Down
156 changes: 0 additions & 156 deletions app/opal-rspec/opal_fixes.rb

This file was deleted.

0 comments on commit 6130693

Please sign in to comment.