Skip to content

Commit

Permalink
Use more consistent naming
Browse files Browse the repository at this point in the history
adambeynon committed Oct 18, 2013

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2429580 commit 57fcf2f
Showing 5 changed files with 12 additions and 16 deletions.
8 changes: 4 additions & 4 deletions opal/opal/rspec.rb
Original file line number Diff line number Diff line change
@@ -12,12 +12,12 @@
require 'opal/rspec/browser_formatter'
require 'opal/rspec/runner'


RSpec.configure do |config|
# For now, always use our custom formatter for results
config.formatter = OpalRSpec::Runner.default_formatter
config.formatter = Opal::RSpec::Runner.default_formatter

# Always support expect() and .should syntax (we should not do this really..)
config.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
config.expect_with :rspec do |c|
c.syntax = [:should, :expect]
end
end

5 changes: 2 additions & 3 deletions opal/opal/rspec/browser_formatter.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'opal/rspec/text_formatter'

module OpalRSpec
module Opal; module RSpec
class BrowserFormatter < TextFormatter

def start(example_count)
@@ -186,5 +186,4 @@ def append_to_head
}
CSS
end
end

end; end
7 changes: 3 additions & 4 deletions opal/opal/rspec/runner.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module OpalRSpec
module Opal; module RSpec
class Runner

class << self
@@ -27,7 +27,7 @@ def autorun
end
end

def initialize(options={}, configuration=RSpec::configuration, world=RSpec::world)
def initialize(options={}, configuration=::RSpec::configuration, world=::RSpec::world)
@options = options
@configuration = configuration
@world = world
@@ -47,5 +47,4 @@ def run(err=$stdout, out=$stdout)
end
end
end
end

end; end
3 changes: 1 addition & 2 deletions opal/opal/rspec/sprockets_runner.rb.erb
Original file line number Diff line number Diff line change
@@ -8,5 +8,4 @@
<% require_asset s.sub(/^spec\//, '').sub(/\.(rb|opal)$/, '') %>
<% end %>

OpalRSpec::Runner.autorun

Opal::RSpec::Runner.autorun
5 changes: 2 additions & 3 deletions opal/opal/rspec/text_formatter.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module OpalRSpec
module Opal; module RSpec
class TextFormatter
attr_accessor :example_group
attr_reader :duration, :examples, :output
@@ -102,5 +102,4 @@ def finish_with_code(code)
}
end
end
end

end; end

0 comments on commit 57fcf2f

Please sign in to comment.