Skip to content
Browse files

fixing specs and README for Ruby 1.9

  • Loading branch information...
1 parent 64be611 commit 615d95ee7abc3598965ef337a75bb7641bf465fa @ksob committed
Showing with 16 additions and 14 deletions.
  1. +1 −0 Gemfile.lock
  2. +1 −1 README.md
  3. +14 −13 spec/redis_workbook_spec.rb
View
1 Gemfile.lock
@@ -20,6 +20,7 @@ GEM
rspec-mocks (2.7.0)
PLATFORMS
+ ruby
x86-mingw32
DEPENDENCIES
View
2 README.md
@@ -14,7 +14,7 @@ How is that accomplished? All the data that is going to be written is just slice
Compatibility
=============
-So far compatible with ruby 1.8.7. Does not work with 1.9.2. There are a few adjustments needed concerning the use of CSV class which has significantly changed in 1.9.2.
+Ruby 1.8.7, 1.9.2 and 1.9.3
Install
=======
View
27 spec/redis_workbook_spec.rb
@@ -207,29 +207,30 @@
@workbook.set_sheet_data @sheet_name,
rows = YAML.load_file(File.expand_path(File.join(File.dirname(__FILE__), "fixtures/five_rows.yaml"))),
:start_from_row => 0
+
@third_row = YAML::load(
- <<-YAML
- ---
- - !str:CSV::Cell (five rows) row 3 cell 1
- - !str:CSV::Cell (five rows) row 3 cell 2
- - !str:CSV::Cell (five rows) row 3 cell 3
- - !str:CSV::Cell (five rows) row 3 cell 4
- - !str:CSV::Cell (five rows) row 3 cell 5
- - !str:CSV::Cell
- - !str:CSV::Cell
- - !str:CSV::Cell
- YAML
+<<-STR
+---
+- (five rows) row 3 cell 1
+- (five rows) row 3 cell 2
+- (five rows) row 3 cell 3
+- (five rows) row 3 cell 4
+- (five rows) row 3 cell 5
+- ""
+- ""
+- ""
+STR
)
end
it "retrieves all sheet rows from redis" do
@workbook.get_sheet_data_as_array(@sheet_name, rows = 0..-1)[2].
- should == @third_row
+ should eql @third_row
end
it "retrieves single sheet row from redis" do
@workbook.get_sheet_data_as_array(@sheet_name, rows = 2)[0].
- should == @third_row
+ should eql @third_row
end
end
end

0 comments on commit 615d95e

Please sign in to comment.
Something went wrong with that request. Please try again.