micro_sessions 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +8 -0
- data/Gemfile +4 -5
- data/Gemfile.lock +36 -34
- data/README.md +91 -0
- data/Rakefile +2 -25
- data/lib/micro_session/engine.rb +20 -0
- data/lib/micro_session/store.rb +60 -0
- data/lib/micro_session/version.rb +4 -0
- data/lib/micro_sessions.rb +2 -16
- data/spec/controllers/humans_controller_spec.rb +9 -0
- data/spec/controllers/mutants_controller_spec.rb +31 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/controllers/humans_controller.rb +9 -0
- data/spec/dummy/app/controllers/mutants_controller.rb +12 -0
- data/spec/dummy/app/views/humans/index.html.erb +1 -0
- data/spec/dummy/app/views/mutants/index.html.erb +9 -0
- data/spec/dummy/app/views/mutants/show.html.erb +3 -0
- data/spec/dummy/config/database.yml +2 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/init.rb +32 -0
- data/spec/dummy/log/test.log +1327 -0
- data/spec/features/persisting_session_using_links_spec.rb +23 -0
- data/spec/rails_helper.rb +17 -0
- data/spec/spec_helper.rb +16 -7
- metadata +31 -19
- data/README.rdoc +0 -80
- data/lib/micro_sessions/controller.rb +0 -30
- data/lib/micro_sessions/helpers.rb +0 -37
- data/lib/micro_sessions/micro_session.rb +0 -48
- data/lib/micro_sessions/railtie.rb +0 -31
- data/lib/micro_sessions/version.rb +0 -3
- data/spec/controller_spec.rb +0 -80
- data/spec/helpers_spec.rb +0 -25
data/spec/helpers_spec.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
# Complex Stubbing does not do us any good here... relying on integration tests...
|
4
|
-
describe MicroSessions::Helpers do
|
5
|
-
# before do
|
6
|
-
# @controller_class = Class.new(ActionController::Base)
|
7
|
-
# @controller_class.stub(:micro_session_options).and_return(:param => "_msid")
|
8
|
-
# @helpers = ActionView::Base.new
|
9
|
-
# @helpers.stub(:controller).and_return(@controller_class.new)
|
10
|
-
# @helpers.stub(:micro_session).and_return(mock(:id => "abc123"))
|
11
|
-
# end
|
12
|
-
#
|
13
|
-
# it "should respond to #micro_session_hidden_field" do
|
14
|
-
# @helpers.should respond_to(:micro_session_hidden_field)
|
15
|
-
# end
|
16
|
-
#
|
17
|
-
# it "should render correct micro_session_hidden_field" do
|
18
|
-
# @helpers.micro_session_hidden_field.should == %{<input id="_msid" name="_msid" type="hidden" value="abc123" />}
|
19
|
-
# end
|
20
|
-
#
|
21
|
-
# TODO: This is way too complex to test, requires an enormous amount of stubbing... Need a real Rails app.
|
22
|
-
# it "should render correct link_to with :micro_sessions => true" do
|
23
|
-
# @helpers.url_for
|
24
|
-
# end
|
25
|
-
end
|