carrier 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +11 -7
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/app/controllers/carrier/messages_controller.rb +7 -2
- data/app/views/carrier/messages/_message.html.erb +1 -2
- data/app/views/carrier/messages/_reply.html.erb +2 -2
- data/app/views/carrier/messages/show.html.erb +0 -3
- data/carrier.gemspec +29 -23
- data/config/locales/carrier.en.yml +4 -0
- data/config/locales/carrier.ru.yml +4 -0
- data/lib/carrier/rails/engine.rb +1 -1
- data/spec/dummy/app/helpers/application_helper.rb +1 -0
- data/spec/dummy/app/views/devise/registrations/new.html.erb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +1 -1
- data/spec/dummy/config/cucumber.yml +8 -0
- data/spec/dummy/config/database.yml +2 -2
- data/spec/dummy/config/environments/test.rb +2 -0
- data/spec/dummy/db/schema.rb +12 -12
- data/spec/dummy/factories/message.rb +9 -0
- data/spec/dummy/factories/user.rb +13 -0
- data/spec/dummy/features/carrier.feature +79 -0
- data/spec/dummy/features/step_definitions/debug_steps.rb +15 -0
- data/spec/dummy/features/step_definitions/resources_steps.rb +15 -0
- data/spec/dummy/features/step_definitions/web_steps.rb +301 -0
- data/spec/dummy/features/support/carrier_routes_helper.rb +5 -0
- data/spec/dummy/features/support/env.rb +47 -0
- data/spec/dummy/features/support/paths.rb +34 -0
- data/spec/dummy/features/support/rails_helper.rb +50 -0
- data/spec/dummy/features/support/singleton.rb +17 -0
- data/spec/dummy/features/support/transaction.rb +30 -0
- data/spec/dummy/lib/tasks/cucumber.rake +65 -0
- data/spec/dummy/script/cucumber +10 -0
- data/spec/dummy_spec_helper.rb +12 -26
- metadata +189 -136
- data/TODO +0 -1
- data/script/rails +0 -6
- data/spec/integration/carrier_spec.rb +0 -73
- data/test/helper.rb +0 -18
- data/test/test_carrier.rb +0 -7
data/script/rails
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#!/usr/bin/env ruby
|
3
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
4
|
-
|
5
|
-
ENGINE_PATH = File.expand_path('../..', __FILE__)
|
6
|
-
load File.expand_path('../../spec/dummy/script/rails', __FILE__)
|
@@ -1,73 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
require 'dummy_spec_helper'
|
4
|
-
|
5
|
-
module DeviseSessionHelpers
|
6
|
-
def login_with email, password
|
7
|
-
fill_in "Email", :with => email
|
8
|
-
fill_in "Password", :with => password
|
9
|
-
click_button "Sign in"
|
10
|
-
end
|
11
|
-
|
12
|
-
def login_user
|
13
|
-
visit new_user_session_path
|
14
|
-
login_with 'stanislaw@gmail.com', "666666"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
feature "Carrier", %q{
|
19
|
-
In order to have github-like messaging functionality
|
20
|
-
As an user
|
21
|
-
I want to do create, receive, list and archive messages} do
|
22
|
-
|
23
|
-
background do
|
24
|
-
Capybara.reset_sessions!
|
25
|
-
load_seeds
|
26
|
-
|
27
|
-
login_user
|
28
|
-
end
|
29
|
-
|
30
|
-
include DeviseSessionHelpers
|
31
|
-
|
32
|
-
scenario "Inbox: listing messages" do
|
33
|
-
visit '/carrier/messages'
|
34
|
-
|
35
|
-
page.should_not have_content("message#1")
|
36
|
-
page.should have_content("message#2")
|
37
|
-
page.should_not have_content("message#3")
|
38
|
-
page.should have_content("message#4")
|
39
|
-
end
|
40
|
-
|
41
|
-
scenario "Sent: listing messages" do
|
42
|
-
visit '/carrier/messages/sent'
|
43
|
-
page.should_not have_content("message#1")
|
44
|
-
page.should have_content("message#2")
|
45
|
-
page.should have_content("message#3")
|
46
|
-
page.should_not have_content("message#4")
|
47
|
-
end
|
48
|
-
|
49
|
-
scenario "Creating a message" do
|
50
|
-
visit "/carrier/messages"
|
51
|
-
click_link "New"
|
52
|
-
|
53
|
-
select 'marixa', :from => "Recipients"
|
54
|
-
select 'miloviza', :from => "Recipients"
|
55
|
-
|
56
|
-
fill_in "Subject", :with => "Тема тестового сообщения"
|
57
|
-
fill_in "Message", :with => "тестовое сообщение"
|
58
|
-
|
59
|
-
click_button("Send")
|
60
|
-
|
61
|
-
page.should have_content("marixa")
|
62
|
-
page.should have_content("miloviza")
|
63
|
-
page.should have_content("Reply into thread")
|
64
|
-
end
|
65
|
-
|
66
|
-
scenario "Archiving a message", :js => true do
|
67
|
-
visit "/carrier/messages/#{Carrier::Message.last.id}"
|
68
|
-
click_link "Archive!"
|
69
|
-
|
70
|
-
page.should have_content("Unarchive?")
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
data/test/helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler'
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'test/unit'
|
11
|
-
require 'shoulda'
|
12
|
-
|
13
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
-
require 'carrier'
|
16
|
-
|
17
|
-
class Test::Unit::TestCase
|
18
|
-
end
|