Skip to content

Commit

Permalink
test: activate rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
tuliren committed May 2, 2018
1 parent de4f4b1 commit 8003ade
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 7 deletions.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--default-path jack-test/test/rb
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ before_script:

script:
- mvn test -B -Pmysql
- bundle exec rspec
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
source "http://rubygems.org"
gem "activesupport", "~> 4.1"
gem "i18n", "~> 0.9"

group :test do
gem "rspec", "~> 3.7"
end
17 changes: 16 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,24 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
concurrent-ruby (1.0.5)
diff-lcs (1.3)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
json (1.8.6)
minitest (5.10.3)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
thread_safe (0.3.6)
tzinfo (1.2.4)
thread_safe (~> 0.1)
Expand All @@ -22,6 +36,7 @@ PLATFORMS
DEPENDENCIES
activesupport (~> 4.1)
i18n (~> 0.9)
rspec (~> 3.7)

BUNDLED WITH
1.15.4
1.16.1
10 changes: 5 additions & 5 deletions jack-test/test/rb/field_defn_spec.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
require File.expand_path(File.dirname(__FILE__) +"/spec_helper.rb")
require File.expand_path(File.dirname(__FILE__) + "/spec_helper.rb")

describe FieldDefn do
it "should parse :not_null as expected" do
f = FieldDefn.new("string", :my_string, 0, {":null" => "false"})
f.nullable?.should == false
f = FieldDefn.new("string", :my_string, 0, {null: false})
expect(f).not_to be_nullable

f = FieldDefn.new("string", :my_string, 0, {})
f.nullable?.should == true
expect(f).to be_nullable
end
end
end
2 changes: 1 addition & 1 deletion jack-test/test/rb/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require File.expand_path(File.dirname(__FILE__) + "/../../src/rb/requires.rb")
require File.expand_path(File.dirname(__FILE__) + "/../../../jack-core/src/rb/requires.rb")

require "rspec"

0 comments on commit 8003ade

Please sign in to comment.