Sha256: bfa60075fe26ad86389762949e4f034dc6abb3818fee58c0883e30e796086f6a

Contents?: true

Size: 510 Bytes

Versions: 14

Compression:

Stored size: 510 Bytes

Contents

require "spec_helper"

describe Shelly::Base do
  before do
    config_dir = File.expand_path("~/.shelly")
    FileUtils.mkdir_p(config_dir)
  end

  describe "#current_user" do
    it "should return user with loaded credentials" do
      File.open(File.join("~/.shelly/credentials"), "w") { |f| f << "superman@example.com\nthe-kal-el" }
      base = Shelly::Base.new
      user = base.current_user
      user.email.should == "superman@example.com"
      user.password.should == "the-kal-el"
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
shelly-0.0.20 spec/shelly/base_spec.rb
shelly-0.0.21.pre spec/shelly/base_spec.rb
shelly-0.0.20.pre spec/shelly/base_spec.rb
shelly-0.0.19 spec/shelly/base_spec.rb
shelly-0.0.18 spec/shelly/base_spec.rb
shelly-0.0.17 spec/shelly/base_spec.rb
shelly-0.0.16 spec/shelly/base_spec.rb
shelly-0.0.15 spec/shelly/base_spec.rb
shelly-0.0.14 spec/shelly/base_spec.rb
shelly-0.0.13 spec/shelly/base_spec.rb
shelly-0.0.12 spec/shelly/base_spec.rb
shelly-0.0.11 spec/shelly/base_spec.rb
shelly-0.0.10 spec/shelly/base_spec.rb
shelly-0.0.9 spec/shelly/base_spec.rb