spec/remora_spec.rb in remora-0.0.1 vs spec/remora_spec.rb in remora-0.0.2
- old
+ new
@@ -1,11 +1,11 @@
require 'spec_helper'
describe Remora do
before do
- email = ENV['email']||"YOUREMAILHERE"
- password = ENV['password']||"YOURPASSWORDHERE"
+ email = ENV['EMAIL']||"YOUREMAILHERE"
+ password = ENV['PASSWORD']||"YOURPASSWORDHERE"
@shark = Remora::Remora.new(email, password)
end
describe '.my_name_is' do
it 'shows my name' do
expect(@shark.my_name_is).to eq("Hi E R")
@@ -55,19 +55,30 @@
end
end
context 'just a last name' do
it 'the Steins' do
properties = @shark.search_by_name_in_sf("Stein")
- expect(properties.length).to eq(128)
+ expect(properties.length).to be > (128)
expect(properties[0][:address]).to eq("954 De Haro St")
expect(properties[0][:owner]).to eq("Stein Quinton F Herz")
expect(properties[1][:address]).to eq("925-927 Dolores St")
expect(properties[1][:owner]).to eq("Katherine Stein Trust")
randys_property = properties.find{ |p| p[:owner]=="Stein Randy" }
expect(randys_property[:address]).to eq("3550 Market St #102")
+ end
+ end
+ end
+ describe '.search_by_name_in_la' do
+ context 'a person has one property' do
+ it 'the Shelley Jo Evans Trustee' do
+ properties = @shark.search_by_name_in_la("Shelley Jo Evans Trustee")
+ expect(properties.length).to eq(1)
+ expect(properties[0][:address]).to eq("9528 Wendon St")
+ expect(properties[0][:owner]).to eq("Evans Shelley Jo Trustee")
+ expect(properties[0][:city]).to eq("Temple City")
end
end
end
end