| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Ruport-util
Revision: 38
Author: wes
Date: 03 Jan 2008 03:14:21
Changes:Removed 'Ruport::Data::' from the kernel method call to Table in test ods_table tests.
Files:| ... | ...@@ -40,26 +40,26 @@ | |
| 40 | 40 | |
| 41 | 41 | # ==== Constructor check ==== |
| 42 | 42 | it "shouldn't be nil if a ods file is passed" do |
| 43 | table = Ruport::Data::Table(@ods_file) | |
| 43 | table = Table(@ods_file) | |
| 44 | 44 | table.should_not be_nil |
| 45 | 45 | end |
| 46 | 46 | |
| 47 | 47 | it "shouldn't be nil if a Openoffice object is passed" do |
| 48 | 48 | oo = Openoffice.new(@ods_file) |
| 49 | 49 | oo.default_sheet = oo.sheets.first |
| 50 | table = Ruport::Data::Table(oo) # This will be passed to the base Ruport::Data::Table class. | |
| 50 | table = Table(oo) # This will be passed to the base Ruport::Data::Table class. | |
| 51 | 51 | table.should_not be_nil |
| 52 | 52 | end |
| 53 | 53 | |
| 54 | 54 | it "shouldn't be nil if a Ruport::Data::Ruport::Data::Table parameter is passed" do |
| 55 | table = Ruport::Data::Table(@csv_file) # Pass cs file | |
| 55 | table = Table(@csv_file) # Pass cs file | |
| 56 | 56 | table.should_not be_nil |
| 57 | 57 | end |
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | # ==== Constructor check with options params ==== |
| 61 | 61 | it "shouldn't be nil if a ods file is passed with options params" do |
| 62 | table = Ruport::Data::Table(@ods_file, {:has_column_names => false}) | |
| 62 | table = Table(@ods_file, {:has_column_names => false}) | |
| 63 | 63 | table.should_not be_nil |
| 64 | 64 | end |
| 65 | 65 | |
| ... | ...@@ -71,7 +71,7 @@ | |
| 71 | 71 | end |
| 72 | 72 | |
| 73 | 73 | it "shouldn't be nil if a Ruport::Data::Ruport::Data::Table parameter is passed with options params" do |
| 74 | table = Ruport::Data::Table(@csv_file, {:has_column_names => false}) # Pass cs file | |
| 74 | table = Table(@csv_file, {:has_column_names => false}) # Pass cs file | |
| 75 | 75 | table.should_not be_nil |
| 76 | 76 | end |
| 77 | 77 | |
| ... | ...@@ -79,7 +79,7 @@ | |
| 79 | 79 | # ==== Ruport::Data::Table load check ==== |
| 80 | 80 | it "table should be valid without column names loaded from ods file" do |
| 81 | 81 | # Load data from ods file but do not load column headers. |
| 82 | table = Ruport::Data::Table(@ods_file, {:has_column_names => false}) | |
| 82 | table = Table(@ods_file, {:has_column_names => false}) | |
| 83 | 83 | table.should_not be_nil |
| 84 | 84 | table.column_names.should == [] |
| 85 | 85 | |
| ... | ...@@ -92,7 +92,7 @@ | |
| 92 | 92 | |
| 93 | 93 | it "table should be valid with column names loaded from ods file" do |
| 94 | 94 | # Load data from ods file but do not load column headers. |
| 95 | table = Ruport::Data::Table(@ods_file) | |
| 95 | table = Table(@ods_file) | |
| 96 | 96 | table.should_not be_nil |
| 97 | 97 | table.column_names.should == @ods_file_column_names |
| 98 | 98 | |
| ... | ...@@ -102,7 +102,7 @@ | |
| 102 | 102 | |
| 103 | 103 | it "table should be valid with column names loaded from ods file using Sheet2" do |
| 104 | 104 | # Load data from ods file but do not load column headers. |
| 105 | table = Ruport::Data::Table(@ods_file, {:select_sheet => 'Sheet2'}) | |
| 105 | table = Table(@ods_file, {:select_sheet => 'Sheet2'}) | |
| 106 | 106 | table.should_not be_nil |
| 107 | 107 | table.column_names.should == @ods_file_column_names2 |
| 108 | 108 |