Sha256: a121672d22149aa672a61ddb92302fc6338c1077abdd56bcb7dade1961a8792f
Contents?: true
Size: 919 Bytes
Versions: 5
Compression:
Stored size: 919 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Dataset do context "before save" do subject{ build(:dataset) } it { should respond_to :columns_count } it { should respond_to :data } it { should respond_to :data_table } it "should have data" do subject.data_table.count.should eq 730 end it "should have four columns" do subject.data_table[0].count.should eq 4 end end context "after save" do subject{ d = create(:dataset); Dataset.find(d.id) } describe "#column_ids" do it "should have 3 columns" do subject.column_ids.count.should eq 3 end it "should each be present" do subject.column_ids.each{|cid| cid.present?.should be_true } end end describe "#data" do it "should have data" do subject.data.count.should eq 730 end end end end
Version data entries
5 entries across 5 versions & 1 rubygems