Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Engines & RSpec
Search
Amanda
January 21, 2016
Technology
0
230
Rails Engines & RSpec
Amanda
January 21, 2016
Tweet
Share
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
89
Aprendizados de um projeto Elixir OTP
amandasposito
4
590
SOLID - Dependency inversion principle
amandasposito
0
81
Como concorrência funciona em Elixir?
amandasposito
1
230
Programação Funcional & Elixir
amandasposito
3
130
Ecto, você sabe o que é ?
amandasposito
4
240
Novidades no Rails 5
amandasposito
0
99
Elixir e Phoenix
amandasposito
3
570
Elixir em 5 minutos
amandasposito
1
93
Other Decks in Technology
See All in Technology
Databricks Free Edition講座 データサイエンス編
taka_aki
0
250
みんなだいすきALB、NLBの 仕組みから最新機能まで総おさらい / Mastering ALB & NLB: Internal Mechanics and Latest Innovations
kaminashi
0
150
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
フロントエンド開発者のための「厄払い」
optim
0
180
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
2026年はチャンキングを極める!
shibuiwilliam
8
1.7k
しろおびセキュリティへ ようこそ
log0417
0
200
エンジニアとマネジメントの距離/Engineering and Management
ikuodanaka
3
680
MySQLのJSON機能の活用術
ikomachi226
0
120
書籍執筆での生成AIの活用
sat
PRO
1
230
AI開発の落とし穴 〜馬には乗ってみよAIには添うてみよ〜
sansantech
PRO
10
5.5k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
490
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
170
RailsConf 2023
tenderlove
30
1.3k
GraphQLとの向き合い方2022年版
quramy
50
14k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
50
Everyday Curiosity
cassininazir
0
120
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
48
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
160
Automating Front-end Workflow
addyosmani
1371
200k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Transcript
Rails Engines e RSpec
“Engines can be considered miniature applications that provide functionality to
their host applications. “ http://guides.rubyonrails.org/engines.html
Ruby Gem + MVC “A Rails application is actually just
a ‘supercharged’ engine”
None
É uma maneira de organizar e compartilhar código reutilizável através
de uma ou mais aplicações.
Core Modulo Financeiro Modulo Logística
Redundância Melhor manutenção
Trade-offs
Criando uma Rails Engine do Zero
Nome da nossa engine Sem os arquivos do Test::Unit Plugin
isolado por namespace Cria com uma estrutura padrão com a dummy application especificada
Dummy Application Quando geramos a engine, a partir da linha
de comando, existe uma pequena aplicação dentro do diretório de testes.
None
Ela existe básicamente por que não existe um jeito de
se testar uma Rails Engine fora de uma aplicação Rails
.gemspec
As dependências devem ser adicionadas nesse arquivo para evitar conflitos
na hora de plugar a engine
None
rails generate rspec:install
Obrigada!
Referências https://medium.com/@amandasposito/rails-engines-e-rspec-6e7a8645dc5b#.nemad0vpz http://rspec.info/ http://guides.rubyonrails.org/engines.html https://www.bignerdranch.com/blog/intro-to-rails-engines/ http://stackoverflow.com/questions/6118905/rails-3-1-engine-vs-mountable-app