This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test case for file importing and fix a couple of bugs
- Loading branch information
Jason Hutchens
committed
Apr 24, 2012
1 parent
0c4a319
commit c3fbdd4
Showing
10 changed files
with
58 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') | ||
|
||
describe "Documentation", :if => Gem.available?("rubyXL") do | ||
|
||
it "can import xlsx files using RubyXL" do | ||
|
||
BINDINGS = { | ||
:planet => :B1, | ||
:mass => :B2, | ||
:force => :B3 | ||
} | ||
|
||
s = Soroban::Import::rubyXL("files/Physics.xlsx", 0, BINDINGS ) | ||
|
||
s.planet = 'Earth' | ||
s.mass = 80 | ||
puts s.force # => 783.459251241996 | ||
s.force.should be_within(0.01).of(783.46) | ||
|
||
s.planet = 'Venus' | ||
s.mass = 80 | ||
puts s.force # => 710.044826106394 | ||
s.force.should be_within(0.01).of(710.04) | ||
|
||
end | ||
|
||
end |