spec/quandl/client/models/dataset/persistence_spec.rb in quandl_client-0.1.10 vs spec/quandl/client/models/dataset/persistence_spec.rb in quandl_client-0.1.11
- old
+ new
@@ -9,22 +9,22 @@
context "when created" do
context "without token" do
before(:all){ Quandl::Client.token = '' }
-
+
let(:dataset){ create(:dataset) }
subject{ dataset }
its(:saved?){ should be_false }
its(:status){ should eq 401 }
end
context "with token" do
-
- before(:all){ Quandl::Client.token = AUTH_TOKEN }
-
+
+ before(:all){ Quandl::Client.token = ENV['QUANDL_AUTH_TOKEN'] }
+
let(:source){ create(:source) }
let(:dataset){ create(:dataset, source_code: source.code ) }
subject{ dataset }
its(:saved?){ should be_true }
@@ -32,11 +32,10 @@
end
end
context "when updated" do
- before(:all){ Quandl::Client.token = AUTH_TOKEN }
-
+
let(:source){ create(:source) }
let(:dataset){ create(:dataset, source_code: source.code, data: Quandl::Data::Random.table(rows: 20, columns: 2).to_csv ) }
it "should change data" do
# update the dataset
\ No newline at end of file