Skip to content

Commit 98ec90e

Browse files
committedNov 5, 2013
Update opal, switch to opal-rspec
1 parent 44d6e0a commit 98ec90e

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed
 

‎Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
source 'https://rubygems.org'
22

33
gemspec
4+
5+
gem 'opal', '~> 0.5.0'

‎Rakefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'bundler'
22
Bundler.require
33

4-
require 'opal/spec/rake_task'
5-
Opal::Spec::RakeTask.new(:default)
4+
require 'opal/rspec/rake_task'
5+
Opal::RSpec::RakeTask.new(:default)
66

77
require 'bundler/gem_tasks'

‎opal-activesupport.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
2020
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
2121
gem.require_paths = ['lib']
2222

23-
gem.add_dependency 'opal', '~> 0.4.2'
23+
gem.add_dependency 'opal'
2424
gem.add_development_dependency 'rake'
25-
gem.add_development_dependency 'opal-spec', '~> 0.2.17'
25+
gem.add_development_dependency 'opal-rspec'
2626
end

‎opal/active_support/core_ext/string.rb

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def underscore
2626
`#{self}.replace(/[-\\s]+/g, '_')
2727
.replace(/([A-Z\\d]+)([A-Z][a-z])/g, '$1_$2')
2828
.replace(/([a-z\\d])([A-Z])/g, '$1_$2')
29+
.replace(/-/g, '_')
2930
.toLowerCase()`
3031
end
3132

‎opal/opal-activesupport.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require 'opal/activesupport'
1+
require 'active_support'

‎spec/spec_helper.rb

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
require 'opal-spec'
1+
require 'opal-rspec'
2+
require 'opal-activesupport'
23

3-
def assert_equal actual, expected
4-
actual.should == expected
4+
module TestUnitHelpers
5+
def assert_equal actual, expected
6+
actual.should == expected
7+
end
58
end
9+
10+
RSpec.configure do |config|
11+
config.include TestUnitHelpers
12+
end
13+

0 commit comments

Comments
 (0)
Please sign in to comment.