Skip to content

Instantly share code, notes, and snippets.

@janjiss
Created May 25, 2013 13:29
Show Gist options
  • Select an option

  • Save janjiss/5649042 to your computer and use it in GitHub Desktop.

Select an option

Save janjiss/5649042 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe Terminal do
let(:terminal) {
Terminal.create(
:address => "Kuldiga, Grants iela 29, Latvija",
:type => "ATM"
)
}
it "should initialize" do
expect(terminal.errors).to be_empty
end
it "should have address" do
expect(terminal.address).to eq("Kuldiga, Grants iela 29, Latvija")
end
it "should have longditude" do
expect(terminal.lng).to be_present
end
it "should have latitude" do
expect(terminal.lat).to be_present
end
it "should have latitude" do
expect(terminal.lat).to eq(56.9718347)
end
it "should have longditude" do
expect(terminal.lng).to eq(21.9571646)
end
it "should have type" do
expect(terminal.type).to eq("ATM")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment