Sha256: e8c2c73d1d024749197318b06ddc8c96c6d68c4db18b4a538f771856cce792bb

Contents?: true

Size: 512 Bytes

Versions: 134

Compression:

Stored size: 512 Bytes

Contents

require "spec_helper"

describe Shelly::Model 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::Model.new
      user = base.current_user
      user.email.should == "superman@example.com"
      user.password.should == "the-kal-el"
    end
  end
end

Version data entries

134 entries across 134 versions & 1 rubygems

Version Path
shelly-0.2.28 spec/shelly/model_spec.rb
shelly-0.2.27 spec/shelly/model_spec.rb
shelly-0.2.26 spec/shelly/model_spec.rb
shelly-0.2.25 spec/shelly/model_spec.rb
shelly-0.2.24 spec/shelly/model_spec.rb
shelly-0.2.23 spec/shelly/model_spec.rb
shelly-0.2.22 spec/shelly/model_spec.rb
shelly-0.2.21 spec/shelly/model_spec.rb
shelly-0.2.20 spec/shelly/model_spec.rb
shelly-0.2.19 spec/shelly/model_spec.rb
shelly-0.2.18 spec/shelly/model_spec.rb
shelly-0.2.17 spec/shelly/model_spec.rb
shelly-0.2.16 spec/shelly/model_spec.rb
shelly-0.2.15 spec/shelly/model_spec.rb
shelly-0.2.14 spec/shelly/model_spec.rb
shelly-0.2.13 spec/shelly/model_spec.rb
shelly-0.2.12 spec/shelly/model_spec.rb
shelly-0.2.11 spec/shelly/model_spec.rb
shelly-0.2.10 spec/shelly/model_spec.rb
shelly-0.2.9 spec/shelly/model_spec.rb