-
Notifications
You must be signed in to change notification settings - Fork 9
Disable downloadimg spec #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec| | |
spec.add_dependency 'uuidtools', '~> 2.1' | ||
spec.add_dependency 'launchy', '~> 2.4' | ||
|
||
spec.add_development_dependency 'bundler', '~> 1.12' | ||
spec.add_development_dependency 'bundler', '~> 2.0.0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think Bundler 2 has not been recommended yet. |
||
spec.add_development_dependency 'guard-rspec', '~> 4.7' | ||
spec.add_development_dependency 'rake', '~> 11.2' | ||
spec.add_development_dependency 'rspec', '~> 3.5' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,35 +37,35 @@ | |
end | ||
end | ||
|
||
describe '#download_image' do | ||
let(:username) { ENV['PLOTLY_USERNAME'] } | ||
let(:api_key) { ENV['PLOTLY_API_KEY'] } | ||
let(:path) { TMP_DIR + 'scatter.png' } | ||
|
||
context 'with instantiated client' do | ||
let(:client) { Plotly::Client.new(username, api_key) } | ||
it 'downloads image' do | ||
plot.download_image(path: path, client: client) | ||
|
||
generated_image = open(path).read | ||
expect(generated_image).not_to include('errors') | ||
end | ||
end | ||
|
||
context 'with no client' do | ||
it 'raises error' do | ||
expect { plot.download_image(path: path) }.to raise_error(RuntimeError) | ||
end | ||
end | ||
|
||
context 'with default client' do | ||
it 'downloads image' do | ||
Plotly.auth(username, api_key) | ||
plot.download_image(path: path, height: 300, width: 500, scale: 1) | ||
|
||
generated_image = open(path).read | ||
expect(generated_image).not_to include('errors') | ||
end | ||
end | ||
end | ||
# describe '#download_image' do | ||
# let(:username) { ENV['PLOTLY_USERNAME'] } | ||
# let(:api_key) { ENV['PLOTLY_API_KEY'] } | ||
# let(:path) { TMP_DIR + 'scatter.png' } | ||
# | ||
# context 'with instantiated client' do | ||
# let(:client) { Plotly::Client.new(username, api_key) } | ||
# it 'downloads image' do | ||
# plot.download_image(path: path, client: client) | ||
# | ||
# generated_image = open(path).read | ||
# expect(generated_image).not_to include('errors') | ||
# end | ||
# end | ||
# | ||
# context 'with no client' do | ||
# it 'raises error' do | ||
# expect { plot.download_image(path: path) }.to raise_error(RuntimeError) | ||
# end | ||
# end | ||
# | ||
# context 'with default client' do | ||
# it 'downloads image' do | ||
# Plotly.auth(username, api_key) | ||
# plot.download_image(path: path, height: 300, width: 500, scale: 1) | ||
# | ||
# generated_image = open(path).read | ||
# expect(generated_image).not_to include('errors') | ||
# end | ||
# end | ||
# end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about using |
||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you delete these lines?