Skip to content

Instantly share code, notes, and snippets.

@nilo
Created February 6, 2015 14:26
Show Gist options
  • Save nilo/c761b10100272725ca1c to your computer and use it in GitHub Desktop.
Save nilo/c761b10100272725ca1c to your computer and use it in GitHub Desktop.
require 'rails_helper'
describe Terminal, :type => :model do
it "start with zeros in all fields" do
terminals = create(
:terminal,
total_terminals: nil,
total_lojas: nil,
total_online: nil,
total_offline: nil
)
total = terminals.total_lojas \
+ terminals.total_terminals \
+ terminals.total_online \
+ terminals.total_offline
expect(total).to eq(0)
end
it "has the total of the terminals iqual of the sum of total online and total offline"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment