spec/spacex/roadster_spec.rb in spacex-0.0.7 vs spec/spacex/roadster_spec.rb in spacex-1.0.0
- old
+ new
@@ -1,11 +1,11 @@
# frozen_string_literal: true
require 'spec_helper'
-describe SPACEX do
- context 'Roadster Information', vcr: { cassette_name: 'roadster/info' } do
+describe SPACEX::Roadster do
+ context '#info', vcr: { cassette_name: 'roadster/info' } do
subject do
SPACEX::Roadster.info
end
it 'returns Roadster launch info' do
expect(subject.name).to eq "Elon Musk's Tesla Roadster"
@@ -28,9 +28,9 @@
expect(subject.earth_distance_km).to eq 172_954_806.23899576
expect(subject.earth_distance_mi).to eq 107_469_100.90753104
expect(subject.mars_distance_km).to eq 147_648_108.6344399
expect(subject.mars_distance_mi).to eq 91_744_252.91029055
expect(subject.wikipedia).to eq 'https://en.wikipedia.org/wiki/Elon_Musk%27s_Tesla_Roadster'
- expect(subject.details).to eq "Elon Musk's Tesla Roadster is an electric sports car that served as the dummy payload for the February 2018 Falcon Heavy test flight and is now an artificial satellite of the Sun. Starman, a mannequin dressed in a spacesuit, occupies the driver's seat. The car and rocket are products of Tesla and SpaceX, both companies founded by Elon Musk. This 2008-model Roadster was previously used by Musk for commuting, and is the only consumer car sent into space."
+ expect(subject.details).to start_with "Elon Musk's Tesla Roadster is an electric sports"
end
end
end