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
240
0
Share
Rails Engines & RSpec
Amanda
January 21, 2016
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
96
Aprendizados de um projeto Elixir OTP
amandasposito
4
630
SOLID - Dependency inversion principle
amandasposito
0
89
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
100
Elixir e Phoenix
amandasposito
3
580
Elixir em 5 minutos
amandasposito
1
99
Other Decks in Technology
See All in Technology
ハーネスエンジニアリングをやりすぎた話 ~そのハーネスは解体された~
gotalab555
4
1.7k
Choose your own adventure in agentic design patterns
glaforge
0
140
EarthCopilotに学ぶマルチエージェントオーケストレーション
nakasho
0
300
基盤を育てる 外部SaaS連携の運用
gamonges_dresscode
1
120
Rapid Start: Faster Internet Connections, with Ruby's Help
kazuho
2
570
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
910
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
2
900
AWS認定資格は本当に意味があるのか?
nrinetcom
PRO
2
270
Shipping AI Agents — Lessons from Production
vvatanabe
0
240
Data Hubグループ 紹介資料
sansan33
PRO
0
2.9k
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
320
Good Enough Types: Heuristic Type Inference for Ruby
riseshia
1
220
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
140
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Tell your own story through comics
letsgokoyo
1
900
We Have a Design System, Now What?
morganepeng
55
8.1k
Evolving SEO for Evolving Search Engines
ryanjones
0
180
Thoughts on Productivity
jonyablonski
76
5.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
320
Designing for Performance
lara
611
70k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
260
ラッコキーワード サービス紹介資料
rakko
1
3.1M
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